IHostingEnvironment インターフェイス

定義

注意事項

IHostingEnvironment has been deprecated. Use Microsoft.Extensions.Hosting.IHostEnvironment instead.

アプリケーションが実行されているホスティング環境に関する情報を提供します。

この型は廃止され、今後のバージョンで削除される予定です。 推奨される代替方法は、Microsoftです。Extensions.Hosting.IHostEnvironment。

public interface class IHostingEnvironment
[System.Obsolete("IHostingEnvironment has been deprecated. Use Microsoft.Extensions.Hosting.IHostEnvironment instead.")]
public interface IHostingEnvironment
[<System.Obsolete("IHostingEnvironment has been deprecated. Use Microsoft.Extensions.Hosting.IHostEnvironment instead.")>]
type IHostingEnvironment = interface
Public Interface IHostingEnvironment
派生
属性

プロパティ

名前 説明
ApplicationName
古い.

アプリケーションの名前を取得または設定します。 このプロパティは、ホストによってアプリケーション エントリ ポイントを含むアセンブリに自動的に設定されます。

ContentRootFileProvider
古い.

ContentRootPathを指すIFileProviderを取得または設定します。

ContentRootPath
古い.

アプリケーション コンテンツ ファイルを含むディレクトリへの絶対パスを取得または設定します。

EnvironmentName
古い.

環境の名前を取得または設定します。 ホストは、構成で指定された "環境" キーの値にこのプロパティを自動的に設定します。

拡張メソッド

名前 説明
IsDevelopment(IHostingEnvironment)
古い.

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

IsEnvironment(IHostingEnvironment, String)
古い.

現在のホスティング環境名と指定した値を比較します。

IsProduction(IHostingEnvironment)
古い.

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

IsStaging(IHostingEnvironment)
古い.

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

適用対象