WebHostBuilder.ConfigureAppConfiguration 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
添加一个委托,用于配置 IConfigurationBuilder 将构造 的 IConfiguration。
public:
virtual Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ ConfigureAppConfiguration(Action<Microsoft::AspNetCore::Hosting::WebHostBuilderContext ^, Microsoft::Extensions::Configuration::IConfigurationBuilder ^> ^ configureDelegate);
public Microsoft.AspNetCore.Hosting.IWebHostBuilder ConfigureAppConfiguration (Action<Microsoft.AspNetCore.Hosting.WebHostBuilderContext,Microsoft.Extensions.Configuration.IConfigurationBuilder> configureDelegate);
abstract member ConfigureAppConfiguration : Action<Microsoft.AspNetCore.Hosting.WebHostBuilderContext, Microsoft.Extensions.Configuration.IConfigurationBuilder> -> Microsoft.AspNetCore.Hosting.IWebHostBuilder
override this.ConfigureAppConfiguration : Action<Microsoft.AspNetCore.Hosting.WebHostBuilderContext, Microsoft.Extensions.Configuration.IConfigurationBuilder> -> Microsoft.AspNetCore.Hosting.IWebHostBuilder
Public Function ConfigureAppConfiguration (configureDelegate As Action(Of WebHostBuilderContext, IConfigurationBuilder)) As IWebHostBuilder
参数
- configureDelegate
- Action<WebHostBuilderContext,IConfigurationBuilder>
用于配置 IConfigurationBuilder 将用于构造 的 IConfiguration的委托。
返回
实现
注解
IConfiguration ILoggerFactory和 在此WebHostBuilderContext阶段未初始化。 IConfigurationBuilder使用 的设置预填充 。IWebHostBuilder