HostEnvironmentEnvExtensions.IsDevelopment(IHostEnvironment) Methode

Definition

Überprüft, ob der name der aktuellen Hostumgebung lautet Development.

public:
[System::Runtime::CompilerServices::Extension]
 static bool IsDevelopment(Microsoft::Extensions::Hosting::IHostEnvironment ^ hostEnvironment);
public static bool IsDevelopment(this Microsoft.Extensions.Hosting.IHostEnvironment hostEnvironment);
static member IsDevelopment : Microsoft.Extensions.Hosting.IHostEnvironment -> bool
<Extension()>
Public Function IsDevelopment (hostEnvironment As IHostEnvironment) As Boolean

Parameter

hostEnvironment
IHostEnvironment

Eine Instanz von IHostEnvironment.

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.

Gilt für: