HostingEnvironmentExtensions.IsProduction(IHostingEnvironment) Metod

Definition

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

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

Parametrar

hostingEnvironment
IHostingEnvironment

En instans av IHostingEnvironment.

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