Jack.Extensions.DependencyInjection NuGet Package

支持字段采用[DependencyInjection]方式支持依赖注入,支持属性依赖注入,支持静态字段采用[DependencyInjection]依赖注入,类如果使用[DependencyInjection(Singleton)]等属性,会被自动注入。

.net core 2.x Startup中:

public IServiceProvider ConfigureServices(IServiceCollection services)
{
//your codes here ...

return services.BuildJackServiceProvider();
}

.net core 3.x Program中:
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.UseServiceProviderFactory(new JackAspNetCoreServiceProviderFactory())
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
});
}.




Got any Jack.Extensions.DependencyInjection Question?





Info

Version: 1.0.2.6
Author(s): Jack.Extensions.DependencyInjection
Last Update: Thursday, July 2, 2020
.NET Fiddle: Create the first Fiddle
Project Url: https://github.com/simpleway2016/Jack.Extensions.DependencyInjection.git
NuGet Url: https://www.nuget.org/packages/Jack.Extensions.DependencyInjection


Install
Install-Package Jack.Extensions.DependencyInjection
dotnet add package Jack.Extensions.DependencyInjection
paket add Jack.Extensions.DependencyInjection
Jack.Extensions.DependencyInjection Download (Unzip the "nupkg" after downloading)





STATS

must-have-score

.3

avg-downloads-per-day

3

days-since-last-release

1606