WebAssemblyHostEnvironmentExtensions.IsProduction 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 Production
.
public:
[System::Runtime::CompilerServices::Extension]
static bool IsProduction(Microsoft::AspNetCore::Components::WebAssembly::Hosting::IWebAssemblyHostEnvironment ^ hostingEnvironment);
C#
public static bool IsProduction (this Microsoft.AspNetCore.Components.WebAssembly.Hosting.IWebAssemblyHostEnvironment hostingEnvironment);
static member IsProduction : Microsoft.AspNetCore.Components.WebAssembly.Hosting.IWebAssemblyHostEnvironment -> bool
<Extension()>
Public Function IsProduction (hostingEnvironment As IWebAssemblyHostEnvironment) As Boolean
- hostingEnvironment
- IWebAssemblyHostEnvironment
Instance de IWebAssemblyHostEnvironment.
True si le nom de l’environnement est Production
, sinon false.
Produit | Versions |
---|---|
ASP.NET Core | 3.1, 5.0, 6.0, 7.0, 8.0, 9.0 |