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 的執行個體。
傳回
如果環境名稱為 ,則為 True,否則為 Development false。