HostEnvironmentEnvExtensions.IsProduction(IHostEnvironment) Methode

Definitie

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

Parameters

hostEnvironment
IHostEnvironment

Een exemplaar van IHostEnvironment.

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