共用方式為


WebHostBuilder.ConfigureAppConfiguration 方法

定義

加入用來設定 的委派, 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

實作

備註

ILoggerFactory WebHostBuilderContextIConfiguration 在此階段未初始化。 會 IConfigurationBuilder 預先填入 的 IWebHostBuilder 設定。

適用於