Share via


WebAssemblyHostEnvironmentExtensions.IsEnvironment メソッド

定義

現在のホスティング環境の名前と指定された値を比較します。

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

パラメーター

hostingEnvironment
IWebAssemblyHostEnvironment

IWebAssemblyHostEnvironment のインスタンス。

environmentName
String

検証対象の環境名。

戻り値

指定した名前が現在の環境と同じ場合は True、それ以外の場合は false。

適用対象