Compartilhar via


HostingHostBuilderExtensions.ConfigureContainer<TContainerBuilder> Método

Definição

Habilita a configuração do contêiner de dependência instanciado. Isso pode ser chamado várias vezes e os resultados serão aditivos.

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

Parâmetros de tipo

TContainerBuilder

O tipo do construtor.

Parâmetros

hostBuilder
IHostBuilder

O IHostBuilder a ser configurado.

configureDelegate
Action<TContainerBuilder>

O delegado para configurar o TContainerBuilder.

Retornos

A mesma instância do IHostBuilder para encadeamento.

Aplica-se a