Toms.Injector
1.0.0
dotnet add package Toms.Injector --version 1.0.0
NuGet\Install-Package Toms.Injector -Version 1.0.0
<PackageReference Include="Toms.Injector" Version="1.0.0" />
paket add Toms.Injector --version 1.0.0
#r "nuget: Toms.Injector, 1.0.0"
// Install Toms.Injector as a Cake Addin #addin nuget:?package=Toms.Injector&version=1.0.0 // Install Toms.Injector as a Cake Tool #tool nuget:?package=Toms.Injector&version=1.0.0
Tom's Injector
A very simple dependency injection container.
Getting Started
To use Tom's Injector in your project, you'll need to include the Toms.Injector.dll
in your project's build.
Or you can run the following command to install the nuget package:
PM> NuGet\Install-Package Toms.Injector
Usage
Register your service with the container using the RegisterSingleton
or RegisterTransient
method.
dic.RegisterSingleton<MyService>();
Resolve your service from the container using the Resolve
method.
dic.Resolve<IMyInterface>().HelloWorld();
Create an instance of a class that has a constructor parameter of the registered service type.
dic.CreateInstanceOf<MyClassWithProperty>().MyMethod();
Contributing
If you'd like to contribute to the project, please refer to the repository at https://github.com/TomiEckert/Toms.Injector
. All contributions are welcome!
License
Please refer to the repository for licensing information.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. 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. |
-
net8.0
- No dependencies.
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.0 | 129 | 4/21/2024 |