Condividi tramite


HostingEnvironmentExtensions.IsProduction(IHostingEnvironment) Metodo

Definizione

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.

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

Parametri

hostingEnvironment
IHostingEnvironment

Istanza di IHostingEnvironment.

Restituisce

true se il nome dell'ambiente è Production; in caso contrario, false.

Commenti

I nomi di ambiente "Sviluppo", "Produzione" e "Staging" vengono forniti come utilità per gli sviluppatori di applicazioni. Gli autori della libreria devono evitare l'accoppiamento di comportamenti specifici a questi nomi di ambiente.

Si applica a