HostEnvironmentEnvExtensions.IsStaging(IHostEnvironment) 方法
定义
public:
[System::Runtime::CompilerServices::Extension]
static bool IsStaging(Microsoft::Extensions::Hosting::IHostEnvironment ^ hostEnvironment);
public static bool IsStaging (this Microsoft.Extensions.Hosting.IHostEnvironment hostEnvironment);
static member IsStaging : Microsoft.Extensions.Hosting.IHostEnvironment -> bool
<Extension()>
Public Function IsStaging (hostEnvironment As IHostEnvironment) As Boolean
参数
- hostEnvironment
- IHostEnvironment
IHostEnvironment 的一个实例。An instance of IHostEnvironment.
返回
如果环境名称为 Staging,则为 true
;否则为 false
。true
if the environment name is Staging; otherwise, false
.
注解
环境名称 "开发"、"生产" 和 "过渡" 作为应用程序开发人员的实用程序提供。The environment names "Development", "Production" and "Staging" are provided as a utility for application developers. 库作者应避免将特定行为耦合到这些环境名称。Library authors should avoid coupling specific behavior to these environment names.