WebAssemblyHostEnvironmentExtensions.IsEnvironment Metoda

Definicja

Porównuje bieżącą nazwę środowiska hostingu z określoną wartością.

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

Parametry

hostingEnvironment
IWebAssemblyHostEnvironment

Wystąpienie elementu IWebAssemblyHostEnvironment.

environmentName
String

Nazwa środowiska do weryfikacji pod kątem.

Zwraca

Prawda, jeśli określona nazwa jest taka sama jak bieżące środowisko, w przeciwnym razie wartość false.

Dotyczy