共用方式為


IHostBuilder.ConfigureHostConfiguration 方法

定義

設定建立器本身的組態。 這將用來初始化 IHostEnvironment,以供稍後在組建流程中使用。 這可以呼叫多次,結果會進行累加。

public:
 Microsoft::Extensions::Hosting::IHostBuilder ^ ConfigureHostConfiguration(Action<Microsoft::Extensions::Configuration::IConfigurationBuilder ^> ^ configureDelegate);
public Microsoft.Extensions.Hosting.IHostBuilder ConfigureHostConfiguration (Action<Microsoft.Extensions.Configuration.IConfigurationBuilder> configureDelegate);
abstract member ConfigureHostConfiguration : Action<Microsoft.Extensions.Configuration.IConfigurationBuilder> -> Microsoft.Extensions.Hosting.IHostBuilder
Public Function ConfigureHostConfiguration (configureDelegate As Action(Of IConfigurationBuilder)) As IHostBuilder

參數

configureDelegate
Action<IConfigurationBuilder>

此委派可設定將用來為主機建構 IConfigurationIConfigurationBuilder

傳回

用於鏈結的相同 IHostBuilder 執行個體。

適用於