29 references to ApplicationKey
IIS.Tests (1)
Utilities\TestServer.cs (1)
151
.UseSetting(WebHostDefaults.
ApplicationKey
, typeof(TestServer).GetTypeInfo().Assembly.FullName)
Microsoft.AspNetCore (7)
ConfigureWebHostBuilder.cs (5)
43
var previousApplication = _configuration[WebHostDefaults.
ApplicationKey
];
57
else if (!string.Equals(previousApplication, _configuration[WebHostDefaults.
ApplicationKey
], StringComparison.OrdinalIgnoreCase))
60
throw new NotSupportedException($"The application name changed from \"{previousApplication}\" to \"{_configuration[WebHostDefaults.
ApplicationKey
]}\". Changing the host configuration using WebApplicationBuilder.WebHost is not supported. Use WebApplication.CreateBuilder(WebApplicationOptions) instead.");
118
var previousApplication = _configuration[WebHostDefaults.
ApplicationKey
];
129
else if (string.Equals(key, WebHostDefaults.
ApplicationKey
, StringComparison.OrdinalIgnoreCase) &&
WebApplicationBuilder.cs (1)
221
webHostBuilder.UseSetting(WebHostDefaults.
ApplicationKey
, _hostApplicationBuilder.Environment.ApplicationName ?? "");
WebHost.cs (1)
107
builder.UseSetting(WebHostDefaults.
ApplicationKey
, applicationName);
Microsoft.AspNetCore.Hosting (10)
GenericHost\GenericWebHostBuilder.cs (4)
170
UseSetting(WebHostDefaults.
ApplicationKey
, startupAssemblyName);
193
UseSetting(WebHostDefaults.
ApplicationKey
, startupAssemblyName);
316
UseSetting(WebHostDefaults.
ApplicationKey
, startupAssemblyName);
339
UseSetting(WebHostDefaults.
ApplicationKey
, startupAssemblyName);
GenericHost\SlimWebHostBuilder.cs (1)
81
UseSetting(WebHostDefaults.
ApplicationKey
, startupAssemblyName);
Internal\WebHostOptions.cs (1)
20
ApplicationName = environment?.ApplicationName ?? GetConfig(WebHostDefaults.
ApplicationKey
) ?? Assembly.GetEntryAssembly()?.GetName().Name ?? string.Empty;
WebHostBuilderExtensions.cs (4)
43
hostBuilder.UseSetting(WebHostDefaults.
ApplicationKey
, startupAssemblyName);
72
hostBuilder.UseSetting(WebHostDefaults.
ApplicationKey
, startupAssemblyName);
102
hostBuilder.UseSetting(WebHostDefaults.
ApplicationKey
, startupAssemblyName);
145
hostBuilder.UseSetting(WebHostDefaults.
ApplicationKey
, startupAssemblyName);
Microsoft.AspNetCore.Hosting.Abstractions (1)
HostingAbstractionsWebHostBuilderExtensions.cs (1)
58
.UseSetting(WebHostDefaults.
ApplicationKey
, startupAssemblyName)
Microsoft.AspNetCore.Hosting.Tests (3)
WebHostBuilderTests.cs (2)
296
{ WebHostDefaults.
ApplicationKey
, assemblyName },
948
.UseSetting(WebHostDefaults.
ApplicationKey
, startupAssemblyName)
WebHostConfigurationsTests.cs (1)
17
{ WebHostDefaults.
ApplicationKey
, "MyProjectReference"},
Microsoft.AspNetCore.Tests (5)
WebApplicationTests.cs (5)
393
Assert.Throws<NotSupportedException>(() => builder.WebHost.UseSetting(WebHostDefaults.
ApplicationKey
, nameof(WebApplicationTests)));
417
{ WebHostDefaults.
ApplicationKey
, nameof(WebApplicationTests) }
840
$"--{WebHostDefaults.
ApplicationKey
}=testhost",
890
$"--{WebHostDefaults.
ApplicationKey
}={nameof(WebApplicationTests)}",
2250
builder.Configuration[WebHostDefaults.
ApplicationKey
] = nameof(WebApplicationTests);
Sockets.BindTests (1)
src\Servers\Kestrel\shared\test\TransportTestHelpers\TestServer.cs (1)
106
.UseSetting(WebHostDefaults.
ApplicationKey
, typeof(TestServer).Assembly.FullName)
Sockets.FunctionalTests (1)
src\Servers\Kestrel\shared\test\TransportTestHelpers\TestServer.cs (1)
106
.UseSetting(WebHostDefaults.
ApplicationKey
, typeof(TestServer).Assembly.FullName)