11 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.AspNetCore.Mvc.Testing (1)
WebApplicationFactory.cs (1)
168{ HostDefaults.ApplicationKey, typeof(TEntryPoint).Assembly.GetName()?.Name ?? string.Empty }
Microsoft.AspNetCore.Tests (2)
WebApplicationTests.cs (2)
1084{ HostDefaults.ApplicationKey, "myapp" } 1230{ HostDefaults.ApplicationKey, "appName" },
Microsoft.Extensions.Hosting (5)
HostApplicationBuilder.cs (4)
147optionList.Add(new KeyValuePair<string, string?>(HostDefaults.ApplicationKey, settings.ApplicationName)); 276string? previousApplicationName = config[HostDefaults.ApplicationKey]; 288if (!string.Equals(previousApplicationName, config[HostDefaults.ApplicationKey], StringComparison.OrdinalIgnoreCase)) 290throw new NotSupportedException(SR.Format(SR.ApplicationNameChangeNotSupported, previousApplicationName, config[HostDefaults.ApplicationKey]));
HostBuilder.cs (1)
235string? applicationName = hostConfiguration[HostDefaults.ApplicationKey];