HostingEnvironmentExtensions.IsStaging(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 de l’environnement d’hébergement actuel est Staging. Cette API ne doit pas être utilisée dans les bibliothèques. Pour plus d’informations, consultez les remarques.
public:
[System::Runtime::CompilerServices::Extension]
static bool IsStaging(Microsoft::Extensions::Hosting::IHostingEnvironment ^ hostingEnvironment);
public static bool IsStaging (this Microsoft.Extensions.Hosting.IHostingEnvironment hostingEnvironment);
static member IsStaging : Microsoft.Extensions.Hosting.IHostingEnvironment -> bool
<Extension()>
Public Function IsStaging (hostingEnvironment As IHostingEnvironment) As Boolean
Paramètres
- hostingEnvironment
- IHostingEnvironment
Instance de IHostingEnvironment.
Retours
true
si le nom de l’environnement est Staging ; sinon, false
.
Remarques
Les noms d’environnement « Développement », « Production » et « Préproduction » sont fournis en tant qu’utilitaire pour les développeurs d’applications. Les auteurs de bibliothèques doivent éviter de coupler un comportement spécifique à ces noms d’environnement.
S’applique à
Commentaires
https://aka.ms/ContentUserFeedback.
Bientôt disponible : Tout au long de l’année 2024, nous abandonnerons progressivement le mécanisme de retour d’information GitHub Issues pour le remplacer par un nouveau système de commentaires. Pour plus d’informations, consultez :Soumettre et afficher des commentaires pour