Compartilhar via


WebAssemblyHostEnvironmentExtensions.IsEnvironment Método

Definição

Compara o nome do ambiente de hospedagem atual com o valor especificado.

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

Parâmetros

hostingEnvironment
IWebAssemblyHostEnvironment

Uma instância de IWebAssemblyHostEnvironment.

environmentName
String

Nome do ambiente a ser validado.

Retornos

True se o nome especificado for o mesmo que o ambiente atual; caso contrário, false.

Aplica-se a