Bagikan melalui


HostingAbstractionsWebHostBuilderExtensions.UseEnvironment Metode

Definisi

Tentukan lingkungan yang akan digunakan oleh host web.

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

Parameter

hostBuilder
IWebHostBuilder

untuk IWebHostBuilder mengonfigurasi.

environment
String

Lingkungan untuk menghosting aplikasi.

Mengembalikan

IWebHostBuilder.

Berlaku untuk