WebAssemblyHostEnvironmentExtensions.IsDevelopment 方法

定义

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

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

参数

hostingEnvironment
IWebAssemblyHostEnvironment

IWebAssemblyHostEnvironment 的一个实例。

返回

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

适用于