9 references to EnvironmentKey
Microsoft.AspNetCore (5)
ConfigureWebHostBuilder.cs (5)
46var previousEnvironment = _configuration[WebHostDefaults.EnvironmentKey]; 70else if (!string.Equals(previousEnvironment, _configuration[WebHostDefaults.EnvironmentKey], StringComparison.OrdinalIgnoreCase)) 73throw new NotSupportedException($"The environment changed from \"{previousEnvironment}\" to \"{_configuration[WebHostDefaults.EnvironmentKey]}\". Changing the host configuration using WebApplicationBuilder.WebHost is not supported. Use WebApplication.CreateBuilder(WebApplicationOptions) instead."); 121var previousEnvironment = _configuration[WebHostDefaults.EnvironmentKey]; 143else if (string.Equals(key, WebHostDefaults.EnvironmentKey, StringComparison.OrdinalIgnoreCase) &&
Microsoft.AspNetCore.Hosting (3)
Internal\WebHostOptions.cs (1)
24Environment = environment?.EnvironmentName ?? GetConfig(WebHostDefaults.EnvironmentKey);
WebHostBuilder.cs (2)
47if (string.IsNullOrEmpty(GetSetting(WebHostDefaults.EnvironmentKey))) 50UseSetting(WebHostDefaults.EnvironmentKey, Environment.GetEnvironmentVariable("Hosting:Environment")
Microsoft.AspNetCore.Hosting.Abstractions (1)
HostingAbstractionsWebHostBuilderExtensions.cs (1)
90return hostBuilder.UseSetting(WebHostDefaults.EnvironmentKey, environment);