Microsoft.Extensions.Hosting.IHostBuilder
A program initialization abstraction.
Gets a central location for sharing state between components during the host building process.
Runs the given actions to initialize the host. This can only be called once.
IHostBuilder ConfigureAppConfiguration(Action<HostBuilderContext, IConfigurationBuilder> configureDelegate)
Sets up the configuration for the remainder of the build process and application. This can be called multiple times and
the results will be additive. The results will be available at Configuration for
subsequent operations, as well as in Services.
IHostBuilder ConfigureContainer<TContainerBuilder>(Action<HostBuilderContext, TContainerBuilder> configureDelegate)
Enables configuring the instantiated dependency container. This can be called multiple times and
the results will be additive.
Sets up the configuration for the builder itself. This will be used to initialize the IHostEnvironment
for use later in the build process. This can be called multiple times and the results will be additive.
Adds services to the container. This can be called multiple times and the results will be additive.
IHostBuilder UseServiceProviderFactory<TContainerBuilder>(IServiceProviderFactory<TContainerBuilder> factory)
Overrides the factory used to create the service provider.
IHostBuilder UseServiceProviderFactory<TContainerBuilder>(Func<HostBuilderContext, IServiceProviderFactory<TContainerBuilder>> factory)
Overrides the factory used to create the service provider.