HostingEnvironmentExtensions.IsDevelopment(IHostingEnvironment) Méthode
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 Development. 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 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
- hostingEnvironment
- IHostingEnvironment
Instance de IHostingEnvironment.
true
si le nom de l’environnement est Development ; sinon, false
.
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èque doivent éviter de coupler un comportement spécifique à ces noms d’environnement.
Produit | Versions |
---|---|
.NET | 6, 7, 8, 9 |
.NET Framework | 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |
Commentaires sur .NET
.NET est un projet open source. Sélectionnez un lien pour fournir des commentaires :