Compartilhar via


WebHostBuilder.ConfigureServices Método

Definição

Sobrecargas

ConfigureServices(Action<WebHostBuilderContext,IServiceCollection>)

Adiciona um delegado para configurar serviços adicionais para o host ou aplicativo Web. Isso pode ser chamado várias vezes.

ConfigureServices(Action<IServiceCollection>)

Adiciona um delegado para configurar serviços adicionais para o host ou aplicativo Web. Isso pode ser chamado várias vezes.

ConfigureServices(Action<WebHostBuilderContext,IServiceCollection>)

Origem:
WebHostBuilder.cs
Origem:
WebHostBuilder.cs
Origem:
WebHostBuilder.cs

Adiciona um delegado para configurar serviços adicionais para o host ou aplicativo Web. Isso pode ser chamado várias vezes.

public:
 virtual Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ ConfigureServices(Action<Microsoft::AspNetCore::Hosting::WebHostBuilderContext ^, Microsoft::Extensions::DependencyInjection::IServiceCollection ^> ^ configureServices);
public Microsoft.AspNetCore.Hosting.IWebHostBuilder ConfigureServices (Action<Microsoft.AspNetCore.Hosting.WebHostBuilderContext,Microsoft.Extensions.DependencyInjection.IServiceCollection> configureServices);
abstract member ConfigureServices : Action<Microsoft.AspNetCore.Hosting.WebHostBuilderContext, Microsoft.Extensions.DependencyInjection.IServiceCollection> -> Microsoft.AspNetCore.Hosting.IWebHostBuilder
override this.ConfigureServices : Action<Microsoft.AspNetCore.Hosting.WebHostBuilderContext, Microsoft.Extensions.DependencyInjection.IServiceCollection> -> Microsoft.AspNetCore.Hosting.IWebHostBuilder
Public Function ConfigureServices (configureServices As Action(Of WebHostBuilderContext, IServiceCollection)) As IWebHostBuilder

Parâmetros

configureServices
Action<WebHostBuilderContext,IServiceCollection>

Um delegado para configurar o IServiceCollection.

Retornos

O IWebHostBuilder.

Implementações

Aplica-se a

ConfigureServices(Action<IServiceCollection>)

Origem:
WebHostBuilder.cs
Origem:
WebHostBuilder.cs
Origem:
WebHostBuilder.cs

Adiciona um delegado para configurar serviços adicionais para o host ou aplicativo Web. Isso pode ser chamado várias vezes.

public:
 virtual Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ ConfigureServices(Action<Microsoft::Extensions::DependencyInjection::IServiceCollection ^> ^ configureServices);
public Microsoft.AspNetCore.Hosting.IWebHostBuilder ConfigureServices (Action<Microsoft.Extensions.DependencyInjection.IServiceCollection> configureServices);
abstract member ConfigureServices : Action<Microsoft.Extensions.DependencyInjection.IServiceCollection> -> Microsoft.AspNetCore.Hosting.IWebHostBuilder
override this.ConfigureServices : Action<Microsoft.Extensions.DependencyInjection.IServiceCollection> -> Microsoft.AspNetCore.Hosting.IWebHostBuilder
Public Function ConfigureServices (configureServices As Action(Of IServiceCollection)) As IWebHostBuilder

Parâmetros

configureServices
Action<IServiceCollection>

Um delegado para configurar o IServiceCollection.

Retornos

O IWebHostBuilder.

Implementações

Aplica-se a