IHostingEnvironment Interfaccia

Definizione

Attenzione

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

Attenzione

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

Fornisce informazioni sull'ambiente di hosting in cui viene eseguita un'applicazione.

Questo tipo è obsoleto e verrà rimosso in una versione futura. L'alternativa consigliata è Microsoft.ExtensionsExtensions.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
Derivato
Attributi

Proprietà

ApplicationName
Obsoleti.
Obsoleti.

Ottiene o imposta il nome dell'applicazione. Questa proprietà viene automaticamente impostata dall'host sull'assembly contenente il punto di ingresso dell'applicazione.

ContentRootFileProvider
Obsoleti.
Obsoleti.

Ottiene o imposta un oggetto IFileProvider che punta a ContentRootPath.

ContentRootPath
Obsoleti.
Obsoleti.

Ottiene o imposta il percorso assoluto della directory che include i file di contenuto dell'applicazione.

EnvironmentName
Obsoleti.
Obsoleti.

Ottiene o imposta il nome dell'ambiente. L'host imposta automaticamente questa proprietà sul valore della chiave "Environment", come specificato nella configurazione.

Metodi di estensione

IsDevelopment(IHostingEnvironment)
Obsoleti.
Obsoleti.

Controlla se il nome dell'ambiente di hosting corrente è Development. Questa API non dovrebbe essere usata nelle librerie. Per informazioni dettagliate, vedere la sezione Osservazioni.

IsEnvironment(IHostingEnvironment, String)
Obsoleti.
Obsoleti.

Confronta il nome dell'ambiente di hosting corrente con il valore specificato. Gli autori della libreria dovrebbero evitare di usare questa API. Per informazioni dettagliate, vedere la sezione Osservazioni.

IsProduction(IHostingEnvironment)
Obsoleti.
Obsoleti.

Controlla se il nome dell'ambiente di hosting corrente è Production. Questa API non dovrebbe essere usata nelle librerie. Per informazioni dettagliate, vedere la sezione Osservazioni.

IsStaging(IHostingEnvironment)
Obsoleti.
Obsoleti.

Controlla se il nome dell'ambiente di hosting corrente è Staging. Questa API non dovrebbe essere usata nelle librerie. Per informazioni dettagliate, vedere la sezione Osservazioni.

Si applica a