HostingHostBuilderExtensions.ConfigureAppConfiguration(IHostBuilder, Action<IConfigurationBuilder>) 方法

定義

設定其餘組建流程和應用程式的組態。Sets up the configuration for the remainder of the build process and application. 這可以呼叫多次,結果會進行累加。This can be called multiple times and the results will be additive. 這些結果可用於後續作業的 Configuration,以及 ServicesThe results will be available at Configuration for subsequent operations, as well as in 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

要設定的 IHostBuilderThe IHostBuilder to configure.

configureDelegate
Action<IConfigurationBuilder>

此委派可設定將用來為主機建構 IConfigurationIConfigurationBuilderThe delegate for configuring the IConfigurationBuilder that will be used to construct the IConfiguration for the host.

傳回

IHostBuilder

用於鏈結的相同 IHostBuilder 執行個體。The same instance of the IHostBuilder for chaining.

適用於