HostingEnvironmentExtensions.IsProduction(IHostingEnvironment) メソッド

定義

現在のホスティング環境名が Productionされているかどうかを確認します。

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

パラメーター

hostingEnvironment
IHostingEnvironment

IHostingEnvironmentのインスタンス。

返品

true 環境名が Productionされている場合は ʖ、それ以外の場合は false

注釈

環境名は"開発"、"運用"、および "ステージング" であり、アプリケーション開発者向けのユーティリティとして提供されます。 ライブラリ作成者は、これらの環境名に特定の動作を結合しないようにする必要があります。

適用対象