Easy.Extensions.DependencyInjection
1.0.2
.NET 5.0
This package targets .NET 5.0. The package is compatible with this framework or higher.
.NET Core 3.1
This package targets .NET Core 3.1. The package is compatible with this framework or higher.
.NET Standard 2.0
This package targets .NET Standard 2.0. The package is compatible with this framework or higher.
.NET Framework 4.6.2
This package targets .NET Framework 4.6.2. The package is compatible with this framework or higher.
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Easy.Extensions.DependencyInjection --version 1.0.2
NuGet\Install-Package Easy.Extensions.DependencyInjection -Version 1.0.2
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Easy.Extensions.DependencyInjection" Version="1.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Easy.Extensions.DependencyInjection" Version="1.0.2" />
<PackageReference Include="Easy.Extensions.DependencyInjection" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Easy.Extensions.DependencyInjection --version 1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Easy.Extensions.DependencyInjection, 1.0.2"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Easy.Extensions.DependencyInjection@1.0.2
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Easy.Extensions.DependencyInjection&version=1.0.2
#tool nuget:?package=Easy.Extensions.DependencyInjection&version=1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
依赖注入
自动注册
1.普通类型注册,在类型上使用 [RegisterAttribute] 特性 2.工厂注册,类型实现 IRegisterFactory<TService,TServiceLifetime> 接口 3.<IServiceCollection>.AutoRegister([assemblies]); 注: assemblies 是添加 [RegisterAttribute] 特性或者实现 IRegisterFactory 接口的程序集集合自动注入
1.属性自动注入 2.字段自动注入 在需要自动注入的属性或字段上使用 [InjectAttribute] 特性即可获取Easy服务提供商
<IServiceCollection>.BuildEasyServiceProvider();替换默认服务提供商
<IHostBuilder>.UseServiceProviderFactory(new EasyServiceProviderFactory([EasyServiceProviderOptions]));
更新日志
1.0.0
发布第一个正式版
1.0.1-beta1
1.为服务提供商工厂添加无参构造函数(默认从当前程序域中所有程序集扫描要注册的服务)
1.0.1-beta2
1.解决当前项目依赖问题
1.0.1
1.Easy.Extensions.DependencyInjection 的服务提供商实现AOP
1.0.2
1.修复事件(AOP)中服务提供商参数类型异常问题
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 is compatible. net5.0-windows was computed. net6.0 is compatible. 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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 is compatible. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
| .NET Framework | net461 was computed. net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETCoreApp 3.1
- Easy.Extensions (>= 1.0.1)
- Easy.Extensions.DependencyInjection.Abstractions (>= 1.0.1)
- Microsoft.Extensions.DependencyInjection (>= 6.0.0)
-
.NETFramework 4.6.2
- Easy.Extensions (>= 1.0.1)
- Easy.Extensions.DependencyInjection.Abstractions (>= 1.0.1)
- Microsoft.Extensions.DependencyInjection (>= 6.0.0)
- System.ValueTuple (>= 4.5.0)
-
.NETStandard 2.0
- Easy.Extensions (>= 1.0.1)
- Easy.Extensions.DependencyInjection.Abstractions (>= 1.0.1)
- Microsoft.Extensions.DependencyInjection (>= 6.0.0)
-
.NETStandard 2.1
- Easy.Extensions (>= 1.0.1)
- Easy.Extensions.DependencyInjection.Abstractions (>= 1.0.1)
- Microsoft.Extensions.DependencyInjection (>= 6.0.0)
-
net5.0
- Easy.Extensions (>= 1.0.1)
- Easy.Extensions.DependencyInjection.Abstractions (>= 1.0.1)
- Microsoft.Extensions.DependencyInjection (>= 6.0.0)
-
net6.0
- Easy.Extensions (>= 1.0.1)
- Easy.Extensions.DependencyInjection.Abstractions (>= 1.0.1)
- Microsoft.Extensions.DependencyInjection (>= 6.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.5 | 627 | 6/28/2022 |
| 1.0.4 | 593 | 6/26/2022 |
| 1.0.3 | 581 | 5/25/2022 |
| 1.0.2 | 584 | 5/25/2022 |
| 1.0.1 | 594 | 5/24/2022 |
| 1.0.1-beta2 | 350 | 5/6/2022 |
| 1.0.1-beta1 | 334 | 5/6/2022 |
| 1.0.0 | 590 | 5/5/2022 |
| 1.0.0-beta9 | 310 | 5/1/2022 |
| 1.0.0-beta8 | 321 | 4/27/2022 |
| 1.0.0-beta3 | 351 | 4/15/2022 |