IHostApplicationBuilder.ConfigureContainerBuilder> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Registers a IServiceProviderFactory
public void ConfigureContainer(Microsoft.Extensions.DependencyInjection.IServiceProviderFactory factory, Action? configure = default);
abstract member ConfigureContainer : Microsoft.Extensions.DependencyInjection.IServiceProviderFactory<'ContainerBuilder> * Action<'ContainerBuilder> -> unit
Public Sub ConfigureContainer(Of TContainerBuilder) (factory As IServiceProviderFactory(Of TContainerBuilder), Optional configure As Action(Of TContainerBuilder) = Nothing)
Type Parameters
- TContainerBuilder
The type of builder provided by the IServiceProviderFactory
Parameters
- factory
-
IServiceProviderFactory
The factory object that can create the TContainerBuilder and IServiceProvider.
- configure
-
Action
A delegate used to configure the TContainerBuilder. This can be used to configure services using
APIS specific to the IServiceProviderFactory
Remarks
The IServiceProvider is created when this builder is built and so the delegate provided by configure will run after all other services have been registered.
Multiple calls to ConfigureContainerfactory and configure delegate.