Partilhar via


HostBuilder.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:
 virtual Microsoft::Extensions::Hosting::IHostBuilder ^ ConfigureServices(Action<Microsoft::Extensions::Hosting::HostBuilderContext ^, Microsoft::Extensions::DependencyInjection::IServiceCollection ^> ^ configureDelegate);
public Microsoft.Extensions.Hosting.IHostBuilder ConfigureServices (Action<Microsoft.Extensions.Hosting.HostBuilderContext,Microsoft.Extensions.DependencyInjection.IServiceCollection> configureDelegate);
abstract member ConfigureServices : Action<Microsoft.Extensions.Hosting.HostBuilderContext, Microsoft.Extensions.DependencyInjection.IServiceCollection> -> Microsoft.Extensions.Hosting.IHostBuilder
override this.ConfigureServices : Action<Microsoft.Extensions.Hosting.HostBuilderContext, Microsoft.Extensions.DependencyInjection.IServiceCollection> -> Microsoft.Extensions.Hosting.IHostBuilder
Public Function ConfigureServices (configureDelegate As Action(Of HostBuilderContext, IServiceCollection)) As IHostBuilder

Parâmetros

configureDelegate
Action<HostBuilderContext,IServiceCollection>

O delegado para configurar o IConfigurationBuilder que será usado para construir o IConfiguration para o host.

Retornos

A mesma instância do IHostBuilder para encadeamento.

Implementações

Aplica-se a