HostEnvironmentEnvExtensions.IsProduction(IHostEnvironment) Metod

Definition

Kontrollerar om det aktuella värdmiljönamnet är Production.

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

Parametrar

hostEnvironment
IHostEnvironment

En instans av IHostEnvironment.

Returer

true om miljönamnet är Production, annars false.

Kommentarer

Miljönamnen "Utveckling", "Produktion" och "Mellanlagring" tillhandahålls som ett verktyg för programutvecklare. Biblioteksförfattare bör undvika att koppla specifika beteenden till dessa miljönamn.

Gäller för