Udostępnij za pośrednictwem


HostingEnvironmentExtensions.IsProduction(IHostingEnvironment) Metoda

Definicja

Sprawdza, czy bieżąca nazwa środowiska hostingu to Production.

public:
[System::Runtime::CompilerServices::Extension]
 static bool IsProduction(Microsoft::AspNetCore::Hosting::IHostingEnvironment ^ hostingEnvironment);
public static bool IsProduction (this Microsoft.AspNetCore.Hosting.IHostingEnvironment hostingEnvironment);
static member IsProduction : Microsoft.AspNetCore.Hosting.IHostingEnvironment -> bool
<Extension()>
Public Function IsProduction (hostingEnvironment As IHostingEnvironment) As Boolean

Parametry

hostingEnvironment
IHostingEnvironment

Wystąpienie elementu IHostingEnvironment.

Zwraca

Wartość True, jeśli nazwa środowiska to Production, w przeciwnym razie wartość false.

Dotyczy