WebHostBuilder.ConfigureAppConfiguration(Action<WebHostBuilderContext,IConfigurationBuilder>) 方法

定義

加入用來設定 IConfigurationBuilder 將會建立之的委派 IConfiguration

public:
 virtual Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ ConfigureAppConfiguration(Action<Microsoft::AspNetCore::Hosting::WebHostBuilderContext ^, Microsoft::Extensions::Configuration::IConfigurationBuilder ^> ^ configureDelegate);
public Microsoft.AspNetCore.Hosting.IWebHostBuilder ConfigureAppConfiguration (Action<Microsoft.AspNetCore.Hosting.WebHostBuilderContext,Microsoft.Extensions.Configuration.IConfigurationBuilder> configureDelegate);
abstract member ConfigureAppConfiguration : Action<Microsoft.AspNetCore.Hosting.WebHostBuilderContext, Microsoft.Extensions.Configuration.IConfigurationBuilder> -> Microsoft.AspNetCore.Hosting.IWebHostBuilder
override this.ConfigureAppConfiguration : Action<Microsoft.AspNetCore.Hosting.WebHostBuilderContext, Microsoft.Extensions.Configuration.IConfigurationBuilder> -> Microsoft.AspNetCore.Hosting.IWebHostBuilder
Public Function ConfigureAppConfiguration (configureDelegate As Action(Of WebHostBuilderContext, IConfigurationBuilder)) As IWebHostBuilder

參數

configureDelegate
Action<WebHostBuilderContext,IConfigurationBuilder>

用來設定的委派 IConfigurationBuilder ,這個委派將用來建立 IConfiguration

傳回

IWebHostBuilder

IWebHostBuilder

實作

備註

IConfiguration上的和 ILoggerFactoryWebHostBuilderContext 這個階段未初始化。 IConfigurationBuilder會預先填入的設定 IWebHostBuilder

適用於