HostingEnvironmentExtensions.IsDevelopment(IHostingEnvironment) Methode
Definition
Wichtig
Einige Informationen beziehen sich auf Vorabversionen, die vor dem Release ggf. grundlegend überarbeitet werden. Microsoft übernimmt hinsichtlich der hier bereitgestellten Informationen keine Gewährleistungen, seien sie ausdrücklich oder konkludent.
Überprüft, ob der name der aktuellen Hostingumgebung lautet 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
Parameter
- hostingEnvironment
- IHostingEnvironment
Eine Instanz von IHostingEnvironment.
Gibt zurück
true wenn der Umgebungsname lautet Development, andernfalls false.
Hinweise
Die Umgebungsnamen "Development", "Production" und "Staging" werden als Hilfsprogramm für Anwendungsentwickler bereitgestellt. Bibliotheksautoren sollten das Koppeln bestimmter Verhaltensweisen mit diesen Umgebungsnamen vermeiden.