HostingHostBuilderExtensions.ConfigureAppConfiguration 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
为生成过程和应用程序的其余部分设置配置。 可多次进行调用,并累加结果。 可在 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>
配置将用于构造主机的 IConfiguration 的 IConfigurationBuilder 的委托。
返回
用于链接的相同 IHostBuilder 实例。