HostingEnvironmentExtensions.IsProduction(IHostingEnvironment) Methode

Definition

Überprüft, ob der Name der aktuellen Hostumgebung Production ist. Diese API darf nicht in Bibliotheken verwendet werden. Einzelheiten finden Sie in den Hinweisen.

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

Parameter

hostingEnvironment
IHostingEnvironment

Eine Instanz von IHostingEnvironment.

Gibt zurück

true, wenn der Umgebungsname Production ist, andernfalls false.

Hinweise

Die Umgebungsnamen "Development", "Production" und "Staging" werden als Hilfsprogramm für Anwendungsentwickler bereitgestellt. Bibliotheksautoren sollten es vermeiden, bestimmtes Verhalten mit diesen Umgebungsnamen zu koppeln.

Gilt für: