IHostingEnvironment インターフェイス

定義

注意事項

This type is obsolete and will be removed in a future version. The recommended alternative is Microsoft.Extensions.Hosting.IHostEnvironment.

注意事項

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

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

この型は互換性のために残されていますが、今後のバージョンでは削除される予定です。 代わりに Microsoft.Extensions.Hosting.IHostEnvironment を使用することをお勧めします。

public interface class IHostingEnvironment
public interface IHostingEnvironment
[System.Obsolete("This type is obsolete and will be removed in a future version. The recommended alternative is Microsoft.Extensions.Hosting.IHostEnvironment.", false)]
public interface IHostingEnvironment
[System.Obsolete("IHostingEnvironment has been deprecated. Use Microsoft.Extensions.Hosting.IHostEnvironment instead.")]
public interface IHostingEnvironment
type IHostingEnvironment = interface
[<System.Obsolete("This type is obsolete and will be removed in a future version. The recommended alternative is Microsoft.Extensions.Hosting.IHostEnvironment.", false)>]
type IHostingEnvironment = interface
[<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 であるかどうかを確認します。 この API はライブラリでは使用しないでください。詳細については、「解説」を参照してください。

IsEnvironment(IHostingEnvironment, String)
古い.
古い.

現在のホスティング環境の名前と指定された値を比較します。 ライブラリの作成者は、この API を使用しないでください。詳細については、「解説」を参照してください。

IsProduction(IHostingEnvironment)
古い.
古い.

現在のホスティング環境名が Production であるかどうかを確認します。 この API はライブラリでは使用しないでください。詳細については、「解説」を参照してください。

IsStaging(IHostingEnvironment)
古い.
古い.

現在のホスティング環境名が Staging であるかどうかを確認します。 この API はライブラリでは使用しないでください。詳細については、「解説」を参照してください。

適用対象