更新 Wpf.NavigationDemo/Extensions/NavigationRegisterServiceExtensions.cs

This commit is contained in:
Sanchime 2024-10-15 10:28:22 +08:00
parent 5dff208e2c
commit 373658441e
1 changed files with 2 additions and 2 deletions

View File

@ -1,4 +1,4 @@
using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.Extensions.DependencyInjection.Extensions;
using System.Reflection;
using System.Text.RegularExpressions;
@ -13,7 +13,7 @@ public static class NavigationRegisterServiceExtensions
assemblies = [Assembly.GetEntryAssembly() ?? Assembly.GetExecutingAssembly(), Assembly.GetCallingAssembly()];
}
// 注入对话框实例集合
// 注入导航页面实例集合
var navigations = assemblies.Distinct().SelectMany(x => x.GetTypes()).Where(x =>
!x.IsAbstract
&& !x.IsInterface