Sprache

HostingEnvironmentExtensions.IsStaging(IHostingEnvironment) Methode

Definition

Überprüft, ob der name der aktuellen Hostingumgebung lautet Staging.

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

Parameter

hostingEnvironment
IHostingEnvironment

Eine Instanz von IHostingEnvironment.

Gibt zurück

true wenn der Umgebungsname lautet Staging, 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: