HostingEnvironmentExtensions.IsProduction(IHostingEnvironment) Methode

Definitie

Controleert of de naam van de huidige hostingomgeving is 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

Parameters

hostingEnvironment
IHostingEnvironment

Een exemplaar van IHostingEnvironment.

Retouren

true als de omgevingsnaam is Production, anders false.

Opmerkingen

De omgevingsnamen 'Ontwikkeling', 'Productie' en 'Fasering' worden geleverd als een hulpprogramma voor toepassingsontwikkelaars. Auteurs van bibliotheken moeten het koppelen van specifiek gedrag aan deze omgevingsnamen voorkomen.

Van toepassing op