HostingEnvironmentExtensions.IsDevelopment(IHostingEnvironment) Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Vérifie si le nom actuel de l’environnement d’hébergement est Development.
public:
[System::Runtime::CompilerServices::Extension]
static bool IsDevelopment(Microsoft::Extensions::Hosting::IHostingEnvironment ^ hostingEnvironment);
public static bool IsDevelopment(this Microsoft.Extensions.Hosting.IHostingEnvironment hostingEnvironment);
static member IsDevelopment : Microsoft.Extensions.Hosting.IHostingEnvironment -> bool
<Extension()>
Public Function IsDevelopment (hostingEnvironment As IHostingEnvironment) As Boolean
Paramètres
- hostingEnvironment
- IHostingEnvironment
Instance de IHostingEnvironment.
Retours
true si le nom de l’environnement est Development, 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.