Compartilhar via


HostingHostBuilderExtensions.ConfigureServices Método

Definição

Adiciona serviços ao contêiner. Isso pode ser chamado várias vezes e os resultados serão aditivos.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Hosting::IHostBuilder ^ ConfigureServices(Microsoft::Extensions::Hosting::IHostBuilder ^ hostBuilder, Action<Microsoft::Extensions::DependencyInjection::IServiceCollection ^> ^ configureDelegate);
public static Microsoft.Extensions.Hosting.IHostBuilder ConfigureServices (this Microsoft.Extensions.Hosting.IHostBuilder hostBuilder, Action<Microsoft.Extensions.DependencyInjection.IServiceCollection> configureDelegate);
static member ConfigureServices : Microsoft.Extensions.Hosting.IHostBuilder * Action<Microsoft.Extensions.DependencyInjection.IServiceCollection> -> Microsoft.Extensions.Hosting.IHostBuilder
<Extension()>
Public Function ConfigureServices (hostBuilder As IHostBuilder, configureDelegate As Action(Of IServiceCollection)) As IHostBuilder

Parâmetros

hostBuilder
IHostBuilder

O IHostBuilder a ser configurado.

configureDelegate
Action<IServiceCollection>

O delegado para configurar o IServiceCollection.

Retornos

A mesma instância do IHostBuilder para encadeamento.

Aplica-se a