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

用于链接的相同 IHostBuilder 实例。

适用于