Skip to content

A library used to replace the built in Dependency Injection framework from IHostBuilder with Ninject

License

Notifications You must be signed in to change notification settings

ByronMayne/Ninject.Hosting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ninject.Hosting

Allows for replacing of Microsoft.Extensions.DependencyInjection with Ninject by extending the IHostBuilder interface.

Get Started

To use the library you just need to reference the NuGet package. Then there will be a new extension method added called UseNinject.

new HostBuilder()
    .UseNinject()

You can also customize the settings

new HostBuilder()
    .UseNinject(configre =>
    {
        configre.AllowNullInjection = true;
    });

or create your own type of Ninject IKernel

new HostBuilder()
    .UseNinject(
        configure: (config) => 
        {
            config.AllowNullInjection = true;
        } 
        factory: (settings) => 
        {
            return new StandardKernel(settings);
        });

About

A library used to replace the built in Dependency Injection framework from IHostBuilder with Ninject

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages