Allows for replacing of Microsoft.Extensions.DependencyInjection
with Ninject by extending the IHostBuilder
interface.
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);
});