OrangePeel 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package OrangePeel --version 1.0.0                
NuGet\Install-Package OrangePeel -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="OrangePeel" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add OrangePeel --version 1.0.0                
#r "nuget: OrangePeel, 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 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.5.0 487 10/24/2021 1.5.0 is deprecated.
1.4.1 461 8/4/2020
1.4.0 711 3/23/2020
1.3.1 419 8/4/2020
1.3.0 516 12/4/2019
1.1.1 488 10/28/2019
1.1.0 476 10/28/2019
1.0.2 555 5/29/2019
1.0.1 579 4/8/2019
1.0.0 545 4/7/2019