DotNetDynamicInjector 3.0.0
dotnet add package DotNetDynamicInjector --version 3.0.0
NuGet\Install-Package DotNetDynamicInjector -Version 3.0.0
<PackageReference Include="DotNetDynamicInjector" Version="3.0.0" />
paket add DotNetDynamicInjector --version 3.0.0
#r "nuget: DotNetDynamicInjector, 3.0.0"
// Install DotNetDynamicInjector as a Cake Addin #addin nuget:?package=DotNetDynamicInjector&version=3.0.0 // Install DotNetDynamicInjector as a Cake Tool #tool nuget:?package=DotNetDynamicInjector&version=3.0.0
DotNet.DynamicInjector
Dynamic dependency injector for external project DLLs
Dynamically reference external dlls without the need to add them to the project. Leave your project with low dependency and allowing specific dlls according to your business rule or database parameters.
This is the component, works on .NET Core and.NET Framework
Info
Code Quality | Build | Nuget | Contributors |
---|---|---|---|
Platform Support
DotNet.DynamicInjector is a .NET Standard 2.0 library.
Using DynamicInjector
The dlls that should be referenced by default must be in the compiled project folder
Use the service configuration in the startup of your ASP.NET core project
services.RegisterDynamicDependencies(ioCConfiguration);
IoCConfiguration contains the configuration of your dependency injection. It is possible to specify only the namespaces you want to reference, ignoring others in the project
var ioCConfiguration = new IoCConfiguration()
{
AllowedInterfaceNamespaces =
new List<string> {"Mynamespance1", "Mynamespance2"}
};
IoCRole configures the dll and type of dependency you want to automatically inject
var role = new IoCRole
{
Dll = "MyProject.dll", //DLL name
Implementation = "My Implementation", // Implementation name, can be used for a control if you use several projects and wanted to separate them
Priority = 1, // Priority that the dll should be loaded
LifeTime = LifeTime.SCOPED, // Lifetime of your addiction injection
Name = "My client business rule x" //Dependency name. It is used only for identification
};
ioCConfiguration.Roles.Add(role);
Samples coming soon ..
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 | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- Microsoft.Extensions.DependencyInjection (>= 8.0.0)
- System.Runtime.Loader (>= 4.3.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
update References for .net 8