共用方式為


IHostBuilder.ConfigureAppConfiguration 方法

定義

設定其餘組建流程和應用程式的組態。 這可以呼叫多次,結果會進行累加。 這些結果可用於後續作業的 Configuration,以及 Services

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

參數

configureDelegate
Action<HostBuilderContext,IConfigurationBuilder>

此委派可設定將用來為應用程式建構 IConfigurationIConfigurationBuilder

傳回

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

適用於