HostingHostBuilderExtensions.ConfigureAppConfiguration 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
設定其餘組建流程和應用程式的組態。 這可以呼叫多次,結果會進行累加。 這些結果可用於後續作業的 Configuration,以及 Services。
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::Hosting::IHostBuilder ^ ConfigureAppConfiguration(Microsoft::Extensions::Hosting::IHostBuilder ^ hostBuilder, Action<Microsoft::Extensions::Configuration::IConfigurationBuilder ^> ^ configureDelegate);
public static Microsoft.Extensions.Hosting.IHostBuilder ConfigureAppConfiguration (this Microsoft.Extensions.Hosting.IHostBuilder hostBuilder, Action<Microsoft.Extensions.Configuration.IConfigurationBuilder> configureDelegate);
static member ConfigureAppConfiguration : Microsoft.Extensions.Hosting.IHostBuilder * Action<Microsoft.Extensions.Configuration.IConfigurationBuilder> -> Microsoft.Extensions.Hosting.IHostBuilder
<Extension()>
Public Function ConfigureAppConfiguration (hostBuilder As IHostBuilder, configureDelegate As Action(Of IConfigurationBuilder)) As IHostBuilder
參數
- hostBuilder
- IHostBuilder
要設定的 IHostBuilder。
- configureDelegate
- Action<IConfigurationBuilder>
此委派可設定將用來為主機建構 IConfiguration 的 IConfigurationBuilder。
傳回
用於鏈結的相同 IHostBuilder 執行個體。