Udostępnij za pośrednictwem


WebHostBuilderExtensions.ConfigureAppConfiguration Metoda

Definicja

Dodaje delegata do konfigurowania elementu IConfigurationBuilder , który skonstruuje obiekt 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

Parametry

hostBuilder
IWebHostBuilder

Element do skonfigurowania IWebHostBuilder .

configureDelegate
Action<IConfigurationBuilder>

Delegat do konfigurowania IConfigurationBuilder elementu , który będzie używany do konstruowania elementu IConfiguration.

Zwraca

Element IWebHostBuilder.

Uwagi

ILoggerFactory I IConfiguration na WebHostBuilderContext tym etapie są niezainicjowane. Element IConfigurationBuilder jest wstępnie wypełniony ustawieniami obiektu IWebHostBuilder.

Dotyczy