HostingAbstractionsWebHostBuilderExtensions.UseConfiguration 方法

定义

在 Web 主机上使用给定的配置设置。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ UseConfiguration(Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ hostBuilder, Microsoft::Extensions::Configuration::IConfiguration ^ configuration);
public static Microsoft.AspNetCore.Hosting.IWebHostBuilder UseConfiguration (this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder, Microsoft.Extensions.Configuration.IConfiguration configuration);
static member UseConfiguration : Microsoft.AspNetCore.Hosting.IWebHostBuilder * Microsoft.Extensions.Configuration.IConfiguration -> Microsoft.AspNetCore.Hosting.IWebHostBuilder
<Extension()>
Public Function UseConfiguration (hostBuilder As IWebHostBuilder, configuration As IConfiguration) As IWebHostBuilder

参数

hostBuilder
IWebHostBuilder

要配置的 IWebHostBuilder

configuration
IConfiguration

包含 IConfiguration 要使用的设置。

返回

IWebHostBuilder

适用于