HostingEnvironmentExtensions.IsDevelopment(IHostingEnvironment) Methode
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 Hostumgebung Development ist.
public:
[System::Runtime::CompilerServices::Extension]
static bool IsDevelopment(Microsoft::AspNetCore::Hosting::IHostingEnvironment ^ hostingEnvironment);
C#
public static bool IsDevelopment (this Microsoft.AspNetCore.Hosting.IHostingEnvironment hostingEnvironment);
static member IsDevelopment : Microsoft.AspNetCore.Hosting.IHostingEnvironment -> bool
<Extension()>
Public Function IsDevelopment (hostingEnvironment As IHostingEnvironment) As Boolean
- hostingEnvironment
- IHostingEnvironment
Eine Instanz von IHostingEnvironment.
True, wenn der Umgebungsname ist Development, andernfalls false.
Produkt | Versionen |
---|---|
ASP.NET Core | 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0 |