共用方式為


HostBuilder.ConfigureAppConfiguration 方法

定義

設定其餘組建流程和應用程式的組態。 傳入的 Configuration,是透過呼叫 ConfigureHostConfiguration(Action<IConfigurationBuilder>) 所建置的主機組態。 這可以呼叫多次,結果會進行累加。 所有呼叫都經過處理後,將會使用結果更新 Configuration,以供日後建置步驟。 Services DI 容器中也將提供產生的組態。

public:
 virtual 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
override this.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 執行個體。

實作

適用於