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