Condividi tramite


WebAssemblyHostEnvironmentExtensions.IsEnvironment Metodo

Definizione

Confronta il nome dell'ambiente di hosting corrente con il valore specificato.

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

Parametri

environmentName
String

Nome dell'ambiente rispetto al quale eseguire la convalida.

Restituisce

True se il nome specificato corrisponde all'ambiente corrente; in caso contrario, false.

Si applica a