9 references to EnvironmentKey
Microsoft.AspNetCore (5)
ConfigureWebHostBuilder.cs (5)
46
var previousEnvironment = _configuration[WebHostDefaults.
EnvironmentKey
];
70
else if (!string.Equals(previousEnvironment, _configuration[WebHostDefaults.
EnvironmentKey
], StringComparison.OrdinalIgnoreCase))
73
throw 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.");
121
var previousEnvironment = _configuration[WebHostDefaults.
EnvironmentKey
];
143
else if (string.Equals(key, WebHostDefaults.
EnvironmentKey
, StringComparison.OrdinalIgnoreCase) &&
Microsoft.AspNetCore.Hosting (3)
Internal\WebHostOptions.cs (1)
24
Environment = environment?.EnvironmentName ?? GetConfig(WebHostDefaults.
EnvironmentKey
);
WebHostBuilder.cs (2)
47
if (string.IsNullOrEmpty(GetSetting(WebHostDefaults.
EnvironmentKey
)))
50
UseSetting(WebHostDefaults.
EnvironmentKey
, Environment.GetEnvironmentVariable("Hosting:Environment")
Microsoft.AspNetCore.Hosting.Abstractions (1)
HostingAbstractionsWebHostBuilderExtensions.cs (1)
90
return hostBuilder.UseSetting(WebHostDefaults.
EnvironmentKey
, environment);