HostingHostBuilderExtensions.ConfigureContainer<TContainerBuilder> Method

Definition

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

C#
public static Microsoft.Extensions.Hosting.IHostBuilder ConfigureContainer<TContainerBuilder>(this Microsoft.Extensions.Hosting.IHostBuilder hostBuilder, Action<TContainerBuilder> configureDelegate);

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

Produkt Versiounen
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Standard 2.0 (package-provided), 2.1 (package-provided)