Class StreamsHostBuilder<T>
- Namespace
- Steeltoe.Stream.StreamHost
- Assembly
- Steeltoe.Stream.StreamBase.dll
public class StreamsHostBuilder<T> : IHostBuilder
Type Parameters
T
- Inheritance
-
StreamsHostBuilder<T>
- Implements
- Inherited Members
- Extension Methods
Constructors
StreamsHostBuilder(IHostBuilder)
public StreamsHostBuilder(IHostBuilder hostBuilder)
Parameters
hostBuilder
IHostBuilder
Properties
Properties
A central location for sharing state between components during the host building process.
public IDictionary<object, object> Properties { get; }
Property Value
Methods
Build()
Run the given actions to initialize the host. This can only be called once.
public IHost Build()
Returns
ConfigureAppConfiguration(Action<HostBuilderContext, IConfigurationBuilder>)
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.
public IHostBuilder ConfigureAppConfiguration(Action<HostBuilderContext, IConfigurationBuilder> configureDelegate)
Parameters
configureDelegate
Action<HostBuilderContext, IConfigurationBuilder>The delegate for configuring the IConfigurationBuilder that will be used to construct the IConfiguration for the application.
Returns
- IHostBuilder
The same instance of the IHostBuilder for chaining.
ConfigureContainer<TContainerBuilder>(Action<HostBuilderContext, TContainerBuilder>)
Enables configuring the instantiated dependency container. This can be called multiple times and the results will be additive.
public IHostBuilder ConfigureContainer<TContainerBuilder>(Action<HostBuilderContext, TContainerBuilder> configureDelegate)
Parameters
configureDelegate
Action<HostBuilderContext, TContainerBuilder>The delegate which configures the builder.
Returns
- IHostBuilder
The same instance of the IHostBuilder for chaining.
Type Parameters
TContainerBuilder
The type of builder.
ConfigureHostConfiguration(Action<IConfigurationBuilder>)
Set 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.
public IHostBuilder ConfigureHostConfiguration(Action<IConfigurationBuilder> configureDelegate)
Parameters
configureDelegate
Action<IConfigurationBuilder>The delegate for configuring the IConfigurationBuilder that will be used to construct the IConfiguration for the host.
Returns
- IHostBuilder
The same instance of the IHostBuilder for chaining.
ConfigureServices(Action<HostBuilderContext, IServiceCollection>)
Adds services to the container. This can be called multiple times and the results will be additive.
public IHostBuilder ConfigureServices(Action<HostBuilderContext, IServiceCollection> configureDelegate)
Parameters
configureDelegate
Action<HostBuilderContext, IServiceCollection>The delegate for configuring the Microsoft.Extensions.DependencyInjection.IServiceCollection that will be used to construct the IServiceProvider.
Returns
- IHostBuilder
The same instance of the IHostBuilder for chaining.
UseServiceProviderFactory<TContainerBuilder>(IServiceProviderFactory<TContainerBuilder>)
Overrides the factory used to create the service provider.
public IHostBuilder UseServiceProviderFactory<TContainerBuilder>(IServiceProviderFactory<TContainerBuilder> factory)
Parameters
factory
IServiceProviderFactory<TContainerBuilder>The factory to register.
Returns
- IHostBuilder
The same instance of the IHostBuilder for chaining.
Type Parameters
TContainerBuilder
The type of builder.
UseServiceProviderFactory<TContainerBuilder>(Func<HostBuilderContext, IServiceProviderFactory<TContainerBuilder>>)
Overrides the factory used to create the service provider.
public IHostBuilder UseServiceProviderFactory<TContainerBuilder>(Func<HostBuilderContext, IServiceProviderFactory<TContainerBuilder>> factory)
Parameters
factory
Func<HostBuilderContext, IServiceProviderFactory<TContainerBuilder>>
Returns
- IHostBuilder
The same instance of the IHostBuilder for chaining.
Type Parameters
TContainerBuilder
The type of builder.