IHostingEnvironment Interfaz

Definición

Precaución

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

Precaución

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

Proporciona información sobre el entorno de hospedaje en el que se ejecuta una aplicación.

Este tipo está obsoleto y se quitará en una versión futura. La alternativa recomendada es 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
Derivado
Atributos

Propiedades

ApplicationName
Obsoletos.
Obsoletos.

Obtiene o establece el nombre de la aplicación. El host establece esta propiedad de forma automática en el ensamblado que contiene el punto de entrada de la aplicación.

ContentRootFileProvider
Obsoletos.
Obsoletos.

Obtiene o establece un objeto IFileProvider que apunta a ContentRootPath.

ContentRootPath
Obsoletos.
Obsoletos.

Obtiene o establece la ruta de acceso absoluta al directorio que incluye los archivos de contenido de la aplicación.

EnvironmentName
Obsoletos.
Obsoletos.

Obtiene o establece el nombre del entorno. El host establece de forma automática esta propiedad en el valor de la clave "environment" tal y como se especifica en la configuración.

Métodos de extensión

IsDevelopment(IHostingEnvironment)
Obsoletos.
Obsoletos.

Comprueba si el nombre del entorno de hospedaje actual es Development. Esta API no se debe usar en las bibliotecas; consulte los comentarios para obtener más información.

IsEnvironment(IHostingEnvironment, String)
Obsoletos.
Obsoletos.

Compara el nombre del entorno de hospedaje actual con el valor especificado. Los autores de bibliotecas deben evitar el uso de esta API; vea la sección Comentarios para obtener más información.

IsProduction(IHostingEnvironment)
Obsoletos.
Obsoletos.

Comprueba si el nombre del entorno de hospedaje actual es Production. Esta API no se debe usar en las bibliotecas; consulte los comentarios para obtener más información.

IsStaging(IHostingEnvironment)
Obsoletos.
Obsoletos.

Comprueba si el nombre del entorno de hospedaje actual es Staging. Esta API no se debe usar en las bibliotecas; consulte los comentarios para obtener más información.

Se aplica a