Partilhar via


WebHostBuilderExtensions.ConfigureAppConfiguration Método

Definição

Adiciona um delegado para configurar o IConfigurationBuilder que construirá um IConfiguration.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ ConfigureAppConfiguration(Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ hostBuilder, Action<Microsoft::Extensions::Configuration::IConfigurationBuilder ^> ^ configureDelegate);
public static Microsoft.AspNetCore.Hosting.IWebHostBuilder ConfigureAppConfiguration (this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder, Action<Microsoft.Extensions.Configuration.IConfigurationBuilder> configureDelegate);
static member ConfigureAppConfiguration : Microsoft.AspNetCore.Hosting.IWebHostBuilder * Action<Microsoft.Extensions.Configuration.IConfigurationBuilder> -> Microsoft.AspNetCore.Hosting.IWebHostBuilder
<Extension()>
Public Function ConfigureAppConfiguration (hostBuilder As IWebHostBuilder, configureDelegate As Action(Of IConfigurationBuilder)) As IWebHostBuilder

Parâmetros

hostBuilder
IWebHostBuilder

O IWebHostBuilder a ser configurado.

configureDelegate
Action<IConfigurationBuilder>

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

Retornos

O IWebHostBuilder.

Comentários

O IConfiguration e ILoggerFactory no WebHostBuilderContext não são inicializados nesta fase. O IConfigurationBuilder é preenchido previamente com as configurações do IWebHostBuilder.

Aplica-se a