From 18c3117a8ba685a335da86edf94924123408257c Mon Sep 17 00:00:00 2001 From: Joes Date: Mon, 15 Jul 2024 17:06:14 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E4=BB=A3?= =?UTF-8?q?=E7=A0=81.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ServiceCollectionExtension.cs | 10 +++++----- src/EasilyNET.Core/Misc/AssemblyHelper.cs | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/EasilyNET.AutoDependencyInjection/ServiceCollectionExtension.cs b/src/EasilyNET.AutoDependencyInjection/ServiceCollectionExtension.cs index e5661bc2..e0a1cc58 100644 --- a/src/EasilyNET.AutoDependencyInjection/ServiceCollectionExtension.cs +++ b/src/EasilyNET.AutoDependencyInjection/ServiceCollectionExtension.cs @@ -38,14 +38,14 @@ public static IServiceCollection AddApplicationModules(this IServiceCollectio /// /// 初始化应用,配置中间件 /// - /// + /// /// - public static IHost InitializeApplication(this IHost builder) + public static IHost InitializeApplication(this IHost host) { - builder.Services.GetRequiredService>().Value = builder; - var runner = builder.Services.GetRequiredService(); + host.Services.GetRequiredService>().Value = host; + var runner = host.Services.GetRequiredService(); runner.Initialize(); - return builder; + return host; } /// diff --git a/src/EasilyNET.Core/Misc/AssemblyHelper.cs b/src/EasilyNET.Core/Misc/AssemblyHelper.cs index 593e21ae..9f79aecb 100644 --- a/src/EasilyNET.Core/Misc/AssemblyHelper.cs +++ b/src/EasilyNET.Core/Misc/AssemblyHelper.cs @@ -1,6 +1,6 @@ -using Microsoft.Extensions.DependencyModel; using System.Reflection; using System.Runtime.Loader; +using Microsoft.Extensions.DependencyModel; // ReSharper disable MemberCanBePrivate.Global // ReSharper disable UnusedMember.Global @@ -13,14 +13,14 @@ namespace EasilyNET.Core.Misc; // ReSharper disable once UnusedType.Global public static class AssemblyHelper { - private static readonly string[] Filters = ["dotnet-", "Microsoft.", "mscorlib", "netstandard", "System", "Windows"]; + private static readonly HashSet Filters = ["dotnet-", "Microsoft.", "mscorlib", "netstandard", "System", "Windows"]; private static readonly IEnumerable? _allAssemblies; private static readonly IEnumerable? _allTypes; /// /// 需要排除的项目 /// - private static readonly List FilterLibs = []; + private static readonly HashSet FilterLibs = []; /// /// 构造函数 From bcacd7d2abfb2e88642dd1ddf400109ccb6db9d5 Mon Sep 17 00:00:00 2001 From: Joes Date: Tue, 16 Jul 2024 09:56:02 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=AF=B4=E6=98=8E?= =?UTF-8?q?=E4=BF=A1=E6=81=AF.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EasilyNET.AutoDependencyInjection.Core.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EasilyNET.AutoDependencyInjection.Core/EasilyNET.AutoDependencyInjection.Core.csproj b/src/EasilyNET.AutoDependencyInjection.Core/EasilyNET.AutoDependencyInjection.Core.csproj index bb64daa1..5f24b04b 100644 --- a/src/EasilyNET.AutoDependencyInjection.Core/EasilyNET.AutoDependencyInjection.Core.csproj +++ b/src/EasilyNET.AutoDependencyInjection.Core/EasilyNET.AutoDependencyInjection.Core.csproj @@ -12,7 +12,7 @@ https://www.nuget.org/packages/EasilyNET.AutoDependencyInjection.Core - 自动注入和属性注入以及模块化核心库 + 自动注入以及模块化核心库