WebAssemblyHostEnvironmentExtensions.IsEnvironment Methode

Definition

Vergleicht den Namen der aktuellen Hostumgebung mit dem angegebenen Wert.

public:
[System::Runtime::CompilerServices::Extension]
 static bool IsEnvironment(Microsoft::AspNetCore::Components::WebAssembly::Hosting::IWebAssemblyHostEnvironment ^ hostingEnvironment, System::String ^ environmentName);
public static bool IsEnvironment (this Microsoft.AspNetCore.Components.WebAssembly.Hosting.IWebAssemblyHostEnvironment hostingEnvironment, string environmentName);
static member IsEnvironment : Microsoft.AspNetCore.Components.WebAssembly.Hosting.IWebAssemblyHostEnvironment * string -> bool
<Extension()>
Public Function IsEnvironment (hostingEnvironment As IWebAssemblyHostEnvironment, environmentName As String) As Boolean

Parameter

hostingEnvironment
IWebAssemblyHostEnvironment

Eine Instanz von IWebAssemblyHostEnvironment.

environmentName
String

Der Umgebungsname, mit dem die Überprüfung stattfindet.

Gibt zurück

True, wenn der angegebene Name mit der aktuellen Umgebung identisch ist, andernfalls false.

Gilt für: