WebAssemblyHostEnvironmentExtensions.IsEnvironment Yöntem

Tanım

Geçerli barındırma ortamı adını belirtilen değerle karşılaştırır.

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

Parametreler

hostingEnvironment
IWebAssemblyHostEnvironment

IWebAssemblyHostEnvironment öğesinin bir örneği.

environmentName
String

Doğrulanması gereken ortam adı.

Döndürülenler

Belirtilen ad geçerli ortamla aynıysa True, aksi takdirde false.

Şunlara uygulanır