HostingEnvironmentExtensions.IsProduction(IHostingEnvironment) Méthode

Définition

Vérifie si le nom actuel de l’environnement d’hébergement est 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

Paramètres

hostingEnvironment
IHostingEnvironment

Instance de IHostingEnvironment.

Retours

true si le nom de l’environnement est Production, sinon false.

Remarques

Les noms d’environnement « Développement », « Production » et « Préproduction » sont fournis comme utilitaire pour les développeurs d’applications. Les auteurs de bibliothèque doivent éviter le couplage d’un comportement spécifique à ces noms d’environnement.

S’applique à