HostingEnvironmentExtensions.IsDevelopment(IHostingEnvironment) Método

Definición

Comprueba si el nombre del entorno de hospedaje actual es Development.

public:
[System::Runtime::CompilerServices::Extension]
 static bool IsDevelopment(Microsoft::Extensions::Hosting::IHostingEnvironment ^ hostingEnvironment);
public static bool IsDevelopment(this Microsoft.Extensions.Hosting.IHostingEnvironment hostingEnvironment);
static member IsDevelopment : Microsoft.Extensions.Hosting.IHostingEnvironment -> bool
<Extension()>
Public Function IsDevelopment (hostingEnvironment As IHostingEnvironment) As Boolean

Parámetros

hostingEnvironment
IHostingEnvironment

Instancia de IHostingEnvironment.

Devoluciones

true si el nombre del entorno es Development, de lo contrario false, .

Comentarios

Los nombres de entorno "Development", "Production" y "Staging" se proporcionan como utilidad para los desarrolladores de aplicaciones. Los autores de bibliotecas deben evitar el acoplamiento de comportamientos específicos a estos nombres de entorno.

Se aplica a