8 references to ApplicationKey
Microsoft.AspNetCore (3)
ConfigureHostBuilder.cs (3)
64var previousApplicationName = _configuration[HostDefaults.ApplicationKey]; 75if (!string.Equals(previousApplicationName, _configuration[HostDefaults.ApplicationKey], StringComparison.OrdinalIgnoreCase)) 77throw 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.");
Microsoft.Extensions.Hosting (5)
HostApplicationBuilder.cs (4)
149optionList.Add(new KeyValuePair<string, string?>(HostDefaults.ApplicationKey, settings.ApplicationName)); 278string? previousApplicationName = config[HostDefaults.ApplicationKey]; 290if (!string.Equals(previousApplicationName, config[HostDefaults.ApplicationKey], StringComparison.OrdinalIgnoreCase)) 292throw new NotSupportedException(SR.Format(SR.ApplicationNameChangeNotSupported, previousApplicationName, config[HostDefaults.ApplicationKey]));
HostBuilder.cs (1)
235string? applicationName = hostConfiguration[HostDefaults.ApplicationKey];