HostingEnvironmentExtensions.IsDevelopment(IHostingEnvironment) Metod

Definition

Kontrollerar om det aktuella värdmiljönamnet är 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

Parametrar

hostingEnvironment
IHostingEnvironment

En instans av IHostingEnvironment.

Returer

true om miljönamnet är Development, annars false.

Kommentarer

Miljönamnen "Utveckling", "Produktion" och "Mellanlagring" tillhandahålls som ett verktyg för programutvecklare. Biblioteksförfattare bör undvika att koppla specifika beteenden till dessa miljönamn.

Gäller för