HostingEnvironmentExtensions 类

定义

IHostingEnvironment 的扩展方法。

public ref class HostingEnvironmentExtensions abstract sealed
public static class HostingEnvironmentExtensions
type HostingEnvironmentExtensions = class
Public Module HostingEnvironmentExtensions
继承
HostingEnvironmentExtensions

方法

IsDevelopment(IHostingEnvironment)

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

IsEnvironment(IHostingEnvironment, String)

将当前主机环境名称与指定的值进行比较。

IsProduction(IHostingEnvironment)

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

IsStaging(IHostingEnvironment)

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

适用于