WebAssemblyHostEnvironmentExtensions.IsStaging 方法

定义

检查当前主机环境名称是否为 Staging

public:
[System::Runtime::CompilerServices::Extension]
 static bool IsStaging(Microsoft::AspNetCore::Components::WebAssembly::Hosting::IWebAssemblyHostEnvironment ^ hostingEnvironment);
public static bool IsStaging (this Microsoft.AspNetCore.Components.WebAssembly.Hosting.IWebAssemblyHostEnvironment hostingEnvironment);
static member IsStaging : Microsoft.AspNetCore.Components.WebAssembly.Hosting.IWebAssemblyHostEnvironment -> bool
<Extension()>
Public Function IsStaging (hostingEnvironment As IWebAssemblyHostEnvironment) As Boolean

参数

hostingEnvironment
IWebAssemblyHostEnvironment

IWebAssemblyHostEnvironment 的一个实例。

返回

如果环境名称为 ,则 Staging为 True,否则为 false。

适用于