HostingEnvironmentExtensions.IsDevelopment(IHostingEnvironment) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
检查当前主机环境名称是否为 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。