Essy.DependencyManagement.Modularity.Generator 1.0.4-alpha

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

// Install Essy.DependencyManagement.Modularity.Generator as a Cake Tool
#tool nuget:?package=Essy.DependencyManagement.Modularity.Generator&version=1.0.4-alpha&prerelease                

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 composite = new Composite()
    .WithStrategies()
    .WithProviders();

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

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

var readOnlyComposite = composite.ToReadOnly();

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

Without Code Generator

Program.cs

await using var composite = new Composite().WithStrategies();

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

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

var readOnlyComposite = composite.ToReadOnly();

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

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.

There are no supported framework assets in this 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.4.3 179 10/3/2022
1.4.2 111 10/3/2022
1.4.1 116 9/30/2022
1.4.0 110 9/30/2022
1.3.0 121 9/11/2022
1.2.0 111 9/3/2022
1.1.1 114 9/2/2022
1.1.0 107 9/2/2022
1.0.5 110 9/2/2022
1.0.4-alpha 115 8/16/2022
1.0.3-alpha 116 8/11/2022
1.0.2-alpha 130 8/11/2022
1.0.1-alpha 127 8/10/2022
1.0.0-alpha 114 8/10/2022