EnvironmentHelper class

Helpers for determining the current environment name.

public static class EnvironmentHelper

Public Members

name description
static Name { get; } The current environment name.
static ClearOverride() Clear any explicit override for the environment name.
static IsDevelopment() Is the current environment “Development”?
static IsProduction() Is the current environment “Production”?
static IsStaging() Is the current environment “Staging”?
static SetHostEnvironment(…) Set the host environment (usually from DI).
static SetOverride(…) Set an explicit override provider for the environment name.
static SetOverrideName(…) Set an explicit override for the environment name.

See Also