Share via


HostingHostBuilderExtensions.ConfigureContainer<TContainerBuilder> Method

Definition

Enables configuring the instantiated dependency container. This can be called multiple times and the results will be additive.

public:
generic <typename TContainerBuilder>
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Hosting::IHostBuilder ^ ConfigureContainer(Microsoft::Extensions::Hosting::IHostBuilder ^ hostBuilder, Action<TContainerBuilder> ^ configureDelegate);
public static Microsoft.Extensions.Hosting.IHostBuilder ConfigureContainer<TContainerBuilder> (this Microsoft.Extensions.Hosting.IHostBuilder hostBuilder, Action<TContainerBuilder> configureDelegate);
static member ConfigureContainer : Microsoft.Extensions.Hosting.IHostBuilder * Action<'ContainerBuilder> -> Microsoft.Extensions.Hosting.IHostBuilder
<Extension()>
Public Function ConfigureContainer(Of TContainerBuilder) (hostBuilder As IHostBuilder, configureDelegate As Action(Of TContainerBuilder)) As IHostBuilder

Type Parameters

TContainerBuilder

The type of builder.

Parameters

hostBuilder
IHostBuilder

The IHostBuilder to configure.

configureDelegate
Action<TContainerBuilder>

The delegate for configuring the TContainerBuilder.

Returns

The same instance of the IHostBuilder for chaining.

Applies to