DNLiCore_DI 1.0.0
See the version list below for details.
dotnet add package DNLiCore_DI --version 1.0.0
NuGet\Install-Package DNLiCore_DI -Version 1.0.0
<PackageReference Include="DNLiCore_DI" Version="1.0.0" />
paket add DNLiCore_DI --version 1.0.0
#r "nuget: DNLiCore_DI, 1.0.0"
// Install DNLiCore_DI as a Cake Addin #addin nuget:?package=DNLiCore_DI&version=1.0.0 // Install DNLiCore_DI as a Cake Tool #tool nuget:?package=DNLiCore_DI&version=1.0.0
--------------------------------------介绍说明---------------------------------------------
DNLiCore_DI是基于.NetCore下的一个根容器帮助库,其功能比较简单主要是为了在其他类库获取已经注入的服务
和注入服务
--------------------------------------使用说明---------------------------------------------
1.通过Nuget安装DNLiCore_DI类
2.注意:必须在Startup.cs里面增加
注意:必须在 ConfigureServices里面的最下面
//实例化容器对象
DNLiCore_DI.ServiceContext.RegisterServices(services);
3.这样就可以在项目中的任意地方调用注入的服务而不依赖构造注入
例如
var redis= DNLiCore_DI.ServiceContext.GetService < DNLiCore_Cache_Redis.IRedisHelper>(); //获取redis实例
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.1 is compatible. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
-
- Microsoft.Extensions.DependencyInjection (>= 2.1.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Summary of changes made in this release of the package.