I want to support more than the built-in "Development", "Staging", and "Production" environments that are defined in Microsoft.AspNetCore.Hosting.EnvironmentName. I realize that I'm free to invent whatever names I wish when setting the environment during program initialization, but that's not the problem. There are 3 extension methods defined in Microsoft.AspNetCore.Hosting.HostingEnvironmentExtensions that are used seemingly everywhere: IsDevelopment(), IsStaging(), and IsProduction().
How do you customize the behavior of IsDevelopment() so that multiple custom environment names each return true?
For example, I want to differentiate between local development and remote development; 2 environments with their own configuration settings, but both are considered "Development". Another example could be multiple "Staging" environments; one meant for internal testing, one meant for external/client testing, but both are considered "Staging".
I don't believe I can write my own IsDevelopment() extension method and safely assure that mine is always favored over Microsoft's (Closer is better). E.g. mine may be used by code in my project, but what about when code in Mvc itself calls it?