HostingEnvironmentExtensions.IsProduction(IHostingEnvironment) Methode
Definitie
Belangrijk
Bepaalde informatie heeft betrekking op een voorlopige productversie die aanzienlijk kan worden gewijzigd voordat deze wordt uitgebracht. Microsoft biedt geen enkele expliciete of impliciete garanties met betrekking tot de informatie die hier wordt verstrekt.
Controleert of de naam van de huidige hostingomgeving is 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
Parameters
- hostingEnvironment
- IHostingEnvironment
Een exemplaar van IHostingEnvironment.
Retouren
true als de omgevingsnaam is Production, anders false.
Opmerkingen
De omgevingsnamen 'Ontwikkeling', 'Productie' en 'Fasering' worden geleverd als een hulpprogramma voor toepassingsontwikkelaars. Auteurs van bibliotheken moeten het koppelen van specifiek gedrag aan deze omgevingsnamen voorkomen.