HostingEnvironmentExtensions.IsDevelopment(IHostingEnvironment) 方法

定义

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

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

参数

hostingEnvironment
IHostingEnvironment

IHostingEnvironment 的一个实例。

返回

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

适用于