OrangePeel 1.0.0
See the version list below for details.
dotnet add package OrangePeel --version 1.0.0
NuGet\Install-Package OrangePeel -Version 1.0.0
<PackageReference Include="OrangePeel" Version="1.0.0" />
paket add OrangePeel --version 1.0.0
#r "nuget: OrangePeel, 1.0.0"
// Install OrangePeel as a Cake Addin #addin nuget:?package=OrangePeel&version=1.0.0 // Install OrangePeel as a Cake Tool #tool nuget:?package=OrangePeel&version=1.0.0
Orange Peel
Attribute-centric Dependency Injection helpers.
If you're like me you've stopped at some point, looked at your thousands of lines of DI registrations, and thought that maybe it wasn't the best use of time. Or you may have looked at them and thought, hey, these classes know what their lifetimes should be, why is that defined in a separate file?
This project aims to, in the smallest way possible, solve these two issues. To start, define the DI configuration on your classes.
[DependencyInjected(ServiceLifetime.Transient)]
class Car
{
//...
}
Next just call the extension method while building your ServiceCollection
.
serviceCollection.AddOrangePeeledServices();
If you need to register the class with various interfaces, just reference the types in your attribute constructor.
[DependencyInjected(ServiceLifetime.Singleton, typeof(IEngine), typeof(IMachine))]
class BigEngine : IEngine, IMachine
{
//...
}
params
is used here so you can add as many as you want easily.
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 | netcoreapp2.1 is compatible. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
-
.NETCoreApp 2.1
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.