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입니다.

적용 대상