WebHostBuilder.ConfigureAppConfiguration 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
加入用來設定 的委派, 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 。
傳回
實作
備註
ILoggerFactory WebHostBuilderContext 和 IConfiguration 在此階段未初始化。 會 IConfigurationBuilder 預先填入 的 IWebHostBuilder 設定。