共用方式為


HostingHostBuilderExtensions.ConfigureAppConfiguration 方法

定義

設定其餘組建流程和應用程式的組態。 這可以呼叫多次,結果會進行累加。 這些結果可用於後續作業的 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>

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

傳回

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

適用於