Essy.DependencyManagement.Composition 1.2.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Essy.DependencyManagement.Composition --version 1.2.0                
NuGet\Install-Package Essy.DependencyManagement.Composition -Version 1.2.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="Essy.DependencyManagement.Composition" Version="1.2.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Essy.DependencyManagement.Composition --version 1.2.0                
#r "nuget: Essy.DependencyManagement.Composition, 1.2.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 Essy.DependencyManagement.Composition as a Cake Addin
#addin nuget:?package=Essy.DependencyManagement.Composition&version=1.2.0

// Install Essy.DependencyManagement.Composition as a Cake Tool
#tool nuget:?package=Essy.DependencyManagement.Composition&version=1.2.0                

Version 1.0.3-alpha C# 9+ Dot NET 6, 7 Nullable Generator

<a href="https://www.nuget.org/profiles/essy-ecosystem"> <img src="Assets/icon-128-preview.png" alt="NuGet" width="64" /> </a>

Dependency Management

The Dependency Management is a very fast dependency injection and components container, with many interesting features, and without reflexion.

Its allows you to make your project more extensible and modular.

Features

The project contains many extensions (eg - modularity) and nuances that are not described here, read the documentation.

Example

This example is very primitive and does not allow you to take into all the features of the project.

Dependency.cs

public sealed class Dependency { }

Service.cs

public sealed class Service
{
    private readonly Dependency _dependency;

    public Service(Dependency dependency)
    {
        _dependency = dependency;
    }
}

With Code Generator

Program.cs

await using var container = new Container()
    .WithStrategies()
    .WithProviders();

container.SetTarget<Dependency>().ToSingleton();

container.SetTarget<Service>().ToTransient();

var readOnlyContainer = container.ToReadOnly();

var service = readOnlyContainer.LastInstance<Service>();

Without Code Generator

Program.cs

await using var container = new Container().WithStrategies();

container.SetTarget<Dependency>()
    .With(_ => new())
    .ToSingleton();

container.SetTarget<Service>()
    .With(c => new(c.LastInstance<Dependency>()))
    .ToTransient();

var readOnlyContainer = container.ToReadOnly();

var service = readOnlyContainer.LastInstance<Service>();

Installation

<PropertyGroup>
    <Nullable>enable</Nullable>
  
    <EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
    <CompilerGeneratedFilesOutputPath>$(BaseIntermediateOutputPath)Generated</CompilerGeneratedFilesOutputPath>
</PropertyGroup>

<ItemGroup>
    <ProjectReference Include="Essy.DependencyManagement.Injection" Version="1.1.1"/>
    <ProjectReference Include="Essy.DependencyManagement.Injection.Generator" Version="1.1.1" 
                      OutputItemType="Analyzer" 
                      ReferenceOutputAssembly="false" 
                      PrivateAssets="all"/>
    
    <ProjectReference Include="Essy.DependencyManagement.Modularity" Version="1.1.1"/>
    <ProjectReference Include="Essy.DependencyManagement.Modularity.Generator" Version="1.1.1" 
                      OutputItemType="Analyzer" 
                      ReferenceOutputAssembly="false" 
                      PrivateAssets="all"/>
</ItemGroup>

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

Dependency Management is licensed under MIT license.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  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 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Essy.DependencyManagement.Composition:

Package Downloads
Essy.DependencyManagement.Modularity

A very fast dependency injection and component container, with many interesting features, and without reflexion. The Modularity library contains modules and extensions for them, for the container (composite).

Essy.DependencyManagement.Injection

A very fast dependency injection and component container, with many interesting features, and without reflexion. The Injection library contains extensions, strategies, targets, providers, and mechanisms for Dependency Injection for the container (composite).

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.4.3 936 10/3/2022
1.4.2 834 10/3/2022
1.4.1 874 9/30/2022
1.4.0 863 9/30/2022
1.3.0 891 9/11/2022
1.2.0 879 9/3/2022
1.1.1 845 9/2/2022
1.1.0 846 9/2/2022
1.0.5 858 9/2/2022
1.0.4-alpha 417 8/16/2022
1.0.3-alpha 420 8/11/2022
1.0.2-alpha 429 8/11/2022
1.0.1-alpha 422 8/10/2022
1.0.0-alpha 431 8/10/2022