mirror of
https://gitee.com/LongbowEnterprise/BootstrapBlazor.git
synced 2024-12-05 21:50:05 +08:00
!785 fix(#I2A3PX): multiple tab mode in layout throw exception
* fix: 修复 wasm 模式无法获取 GetEntryAssembly() 程序集问题
This commit is contained in:
parent
b4f5e69039
commit
b6ca852b87
@ -207,8 +207,9 @@ namespace BootstrapBlazor.Components
|
||||
|
||||
private Task InitRouteTable() => Task.Run(() =>
|
||||
{
|
||||
var apps = AdditionalAssemblies == null ? new[] { Assembly.GetEntryAssembly()! } : new[] { Assembly.GetEntryAssembly()! }.Concat(AdditionalAssemblies);
|
||||
var componentTypes = apps.SelectMany(a => a.ExportedTypes.Where(t => typeof(IComponent).IsAssignableFrom(t)));
|
||||
var apps = AdditionalAssemblies == null ? new[] { Assembly.GetEntryAssembly() } : new[] { Assembly.GetEntryAssembly() }.Concat(AdditionalAssemblies).Where(a => a != null);
|
||||
var componentTypes = apps.SelectMany(a => a!.ExportedTypes.Where(t => typeof(IComponent).IsAssignableFrom(t)));
|
||||
|
||||
foreach (var componentType in componentTypes)
|
||||
{
|
||||
var routeAttributes = componentType.GetCustomAttributes<RouteAttribute>(false);
|
||||
|
Loading…
Reference in New Issue
Block a user