Skip to content

Latest commit

 

History

History
46 lines (33 loc) · 996 Bytes

README.md

File metadata and controls

46 lines (33 loc) · 996 Bytes

AutoDependencyInjection

NuGet NuGet

Auto generate dependency injection in .NET applications

Installation

You should install AutoDependencyInjection with NuGet:

Install-Package AutoDependencyInjection

Or via the .NET Core command line interface:

dotnet add package AutoDependencyInjection

Usage

public partial class Program
{
    public readonly Foo _foo;

    static void Main(string[] args)
    {
    }
}

When compile, following source will be injected.

public partial class Program
{
    public readonly Foo _foo;

    public Program(Foo foo)
    { 
        _foo = foo
    }

    static void Main(string[] args)
    {
    }
}