HostingHostBuilderExtensions.UseEnvironment(IHostBuilder, String) 方法

定义

指定要由主机使用的环境。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Hosting::IHostBuilder ^ UseEnvironment(Microsoft::Extensions::Hosting::IHostBuilder ^ hostBuilder, System::String ^ environment);
public static Microsoft.Extensions.Hosting.IHostBuilder UseEnvironment (this Microsoft.Extensions.Hosting.IHostBuilder hostBuilder, string environment);
static member UseEnvironment : Microsoft.Extensions.Hosting.IHostBuilder * string -> Microsoft.Extensions.Hosting.IHostBuilder
<Extension()>
Public Function UseEnvironment (hostBuilder As IHostBuilder, environment As String) As IHostBuilder

参数

hostBuilder
IHostBuilder

要配置的 IHostBuilder

environment
String

要在其中托管应用程序的环境。

返回

IHostBuilder

适用于