WebHostBuilderExtensions.ConfigureAppConfiguration 方法

定义

添加一个委托,用于配置 IConfigurationBuilder 将构造 的 IConfiguration

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ ConfigureAppConfiguration(Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ hostBuilder, Action<Microsoft::Extensions::Configuration::IConfigurationBuilder ^> ^ configureDelegate);
public static Microsoft.AspNetCore.Hosting.IWebHostBuilder ConfigureAppConfiguration (this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder, Action<Microsoft.Extensions.Configuration.IConfigurationBuilder> configureDelegate);
static member ConfigureAppConfiguration : Microsoft.AspNetCore.Hosting.IWebHostBuilder * Action<Microsoft.Extensions.Configuration.IConfigurationBuilder> -> Microsoft.AspNetCore.Hosting.IWebHostBuilder
<Extension()>
Public Function ConfigureAppConfiguration (hostBuilder As IWebHostBuilder, configureDelegate As Action(Of IConfigurationBuilder)) As IWebHostBuilder

参数

hostBuilder
IWebHostBuilder

要配置的 IWebHostBuilder

configureDelegate
Action<IConfigurationBuilder>

用于配置 IConfigurationBuilder 将用于构造 的 IConfiguration的委托。

返回

IWebHostBuilder

注解

IConfiguration ILoggerFactory和 在此WebHostBuilderContext阶段未初始化。 IConfigurationBuilder使用 的设置预填充 。IWebHostBuilder

适用于