Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #490

Merged
merged 2 commits into from
Jul 16, 2024
Merged

Dev #490

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<PropertyGroup>
<PackageProjectUrl>https://www.nuget.org/packages/EasilyNET.AutoDependencyInjection.Core</PackageProjectUrl>
<Description>自动注入和属性注入以及模块化核心库</Description>
<Description>自动注入以及模块化核心库</Description>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ public static IServiceCollection AddApplicationModules<T>(this IServiceCollectio
/// <summary>
/// 初始化应用,配置中间件
/// </summary>
/// <param name="builder"></param>
/// <param name="host"></param>
/// <returns></returns>
public static IHost InitializeApplication(this IHost builder)
public static IHost InitializeApplication(this IHost host)
{
builder.Services.GetRequiredService<IObjectAccessor<IHost>>().Value = builder;
var runner = builder.Services.GetRequiredService<IStartupModuleRunner>();
host.Services.GetRequiredService<IObjectAccessor<IHost>>().Value = host;
var runner = host.Services.GetRequiredService<IStartupModuleRunner>();
runner.Initialize();
return builder;
return host;
}

/// <summary>
Expand Down
6 changes: 3 additions & 3 deletions src/EasilyNET.Core/Misc/AssemblyHelper.cs
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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<string> Filters = ["dotnet-", "Microsoft.", "mscorlib", "netstandard", "System", "Windows"];
private static readonly IEnumerable<Assembly>? _allAssemblies;
private static readonly IEnumerable<Type>? _allTypes;

/// <summary>
/// 需要排除的项目
/// </summary>
private static readonly List<string> FilterLibs = [];
private static readonly HashSet<string> FilterLibs = [];

/// <summary>
/// 构造函数
Expand Down