11 references to ApplicationKey
Microsoft.AspNetCore (3)
ConfigureHostBuilder.cs (3)
64
var previousApplicationName = _configuration[HostDefaults.
ApplicationKey
];
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.");
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)
147
optionList.Add(new KeyValuePair<string, string?>(HostDefaults.
ApplicationKey
, settings.ApplicationName));
276
string? previousApplicationName = config[HostDefaults.
ApplicationKey
];
288
if (!string.Equals(previousApplicationName, config[HostDefaults.
ApplicationKey
], StringComparison.OrdinalIgnoreCase))
290
throw new NotSupportedException(SR.Format(SR.ApplicationNameChangeNotSupported, previousApplicationName, config[HostDefaults.
ApplicationKey
]));
HostBuilder.cs (1)
235
string? applicationName = hostConfiguration[HostDefaults.
ApplicationKey
];