NetPro.Dependency
6.0.16
dotnet add package NetPro.Dependency --version 6.0.16
NuGet\Install-Package NetPro.Dependency -Version 6.0.16
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="NetPro.Dependency" Version="6.0.16" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add NetPro.Dependency --version 6.0.16
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: NetPro.Dependency, 6.0.16"
#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.
// Install NetPro.Dependency as a Cake Addin
#addin nuget:?package=NetPro.Dependency&version=6.0.16
// Install NetPro.Dependency as a Cake Tool
#tool nuget:?package=NetPro.Dependency&version=6.0.16
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
NetPro.Dependency使用
依赖注入
除了使用官方原生依赖注入外,支持通过接口和正则模式注入
接口方式注入
1、ITransientDependency
2、ISingletonDependency
3、IScopedDependency
public interface IFreeSQLDemoByDependency {}
public class FreeSQLDemoByDependency : IFreeSQLDemoByDependency, IScopedDependency//通过继承注入接口实现依赖注入
{
}
正则批量注入
services.BatchInjection("^XXX.", "Service$"); //批量注入以XXX前缀的程序集,Service结尾的类
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. 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. |
.NET Core | netcoreapp3.1 is compatible. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETCoreApp 3.1
- NetPro.Startup (>= 6.0.16)
- Scrutor (>= 4.1.0)
-
net6.0
- NetPro.Startup (>= 6.0.16)
- Scrutor (>= 4.1.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on NetPro.Dependency:
Repository | Stars |
---|---|
LeonKou/NetPro
🌈An enhanced version with clean architecture of asp.netcore,efficiently manage startup,Support for netcore3.1/6.0
|
Version | Downloads | Last updated |
---|---|---|
6.0.16 | 252 | 7/24/2023 |
6.0.15 | 689 | 7/19/2022 |
6.0.14 | 462 | 7/10/2022 |
6.0.13 | 478 | 6/15/2022 |
6.0.12 | 388 | 6/15/2022 |
6.0.11 | 404 | 6/15/2022 |
6.0.10 | 403 | 6/11/2022 |
6.0.9 | 424 | 6/8/2022 |
6.0.8 | 442 | 5/26/2022 |
6.0.8-beta.3 | 472 | 5/24/2022 |
6.0.8-beta.2 | 105 | 5/24/2022 |
6.0.8-beta.1 | 103 | 5/24/2022 |