1 write to _configuration
Microsoft.AspNetCore (1)
ConfigureHostBuilder.cs (1)
30
_configuration
= configuration;
12 references to _configuration
Microsoft.AspNetCore (12)
ConfigureHostBuilder.cs (12)
47
configureDelegate(_context,
_configuration
);
64
var previousApplicationName =
_configuration
[HostDefaults.ApplicationKey];
67
var previousContentRootConfig =
_configuration
[HostDefaults.ContentRootKey];
68
var previousEnvironment =
_configuration
[HostDefaults.EnvironmentKey];
71
configureDelegate(
_configuration
);
75
if (!string.Equals(previousApplicationName,
_configuration
[HostDefaults.ApplicationKey], StringComparison.OrdinalIgnoreCase))
77
throw new NotSupportedException($"The application name changed from \"{previousApplicationName}\" to \"{
_configuration
[HostDefaults.ApplicationKey]}\". Changing the host configuration using WebApplicationBuilder.Host is not supported. Use WebApplication.CreateBuilder(WebApplicationOptions) instead.");
80
if (!string.Equals(previousContentRootConfig,
_configuration
[HostDefaults.ContentRootKey], StringComparison.OrdinalIgnoreCase)
81
&& !string.Equals(previousContentRoot, HostingPathResolver.ResolvePath(
_configuration
[HostDefaults.ContentRootKey]), StringComparison.OrdinalIgnoreCase))
83
throw new NotSupportedException($"The content root changed from \"{previousContentRoot}\" to \"{HostingPathResolver.ResolvePath(
_configuration
[HostDefaults.ContentRootKey])}\". Changing the host configuration using WebApplicationBuilder.Host is not supported. Use WebApplication.CreateBuilder(WebApplicationOptions) instead.");
86
if (!string.Equals(previousEnvironment,
_configuration
[HostDefaults.EnvironmentKey], StringComparison.OrdinalIgnoreCase))
88
throw new NotSupportedException($"The environment changed from \"{previousEnvironment}\" to \"{
_configuration
[HostDefaults.EnvironmentKey]}\". Changing the host configuration using WebApplicationBuilder.Host is not supported. Use WebApplication.CreateBuilder(WebApplicationOptions) instead.");