Toms.Injector 1.0.0

dotnet add package Toms.Injector --version 1.0.0                
NuGet\Install-Package Toms.Injector -Version 1.0.0                
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="Toms.Injector" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Toms.Injector --version 1.0.0                
#r "nuget: Toms.Injector, 1.0.0"                
#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 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • 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 127 4/21/2024