5 implementations of UseSetting
Microsoft.AspNetCore (1)
ConfigureWebHostBuilder.cs (1)
108public IWebHostBuilder UseSetting(string key, string? value)
Microsoft.AspNetCore.Hosting (3)
GenericHost\HostingStartupWebHostBuilder.cs (1)
50public IWebHostBuilder UseSetting(string key, string? value)
GenericHost\WebHostBuilderBase.cs (1)
102public IWebHostBuilder UseSetting(string key, string? value)
WebHostBuilder.cs (1)
80public IWebHostBuilder UseSetting(string key, string? value)
Microsoft.AspNetCore.Hosting.Tests (1)
Fakes\GenericWebHostBuilderWrapper.cs (1)
71public IWebHostBuilder UseSetting(string key, string value)
104 references to UseSetting
AutobahnTestApp (1)
Program.cs (1)
45webHostBuilder.UseSetting(WebHostDefaults.ServerUrlsKey, string.Empty);
Benchmarks (2)
Program.cs (2)
42.UseSetting("Startup", nameof(StartupUsingEndpointRouting)); 52.UseSetting("Startup", nameof(StartupUsingRouter));
IIS.Tests (1)
Utilities\TestServer.cs (1)
151.UseSetting(WebHostDefaults.ApplicationKey, typeof(TestServer).GetTypeInfo().Assembly.FullName)
InMemory.FunctionalTests (1)
TestTransport\TestServer.cs (1)
81.UseSetting(WebHostDefaults.ShutdownTimeoutKey, context.ShutdownTimeout.TotalSeconds.ToString(CultureInfo.InvariantCulture))
Microsoft.AspNetCore (5)
WebApplicationBuilder.cs (4)
221webHostBuilder.UseSetting(WebHostDefaults.ApplicationKey, _hostApplicationBuilder.Environment.ApplicationName ?? ""); 222webHostBuilder.UseSetting(WebHostDefaults.PreventHostingStartupKey, Configuration[WebHostDefaults.PreventHostingStartupKey]); 223webHostBuilder.UseSetting(WebHostDefaults.HostingStartupAssembliesKey, Configuration[WebHostDefaults.HostingStartupAssembliesKey]); 224webHostBuilder.UseSetting(WebHostDefaults.HostingStartupExcludeAssembliesKey, Configuration[WebHostDefaults.HostingStartupExcludeAssembliesKey]);
WebHost.cs (1)
107builder.UseSetting(WebHostDefaults.ApplicationKey, applicationName);
Microsoft.AspNetCore.Hosting (4)
WebHostBuilderExtensions.cs (4)
43hostBuilder.UseSetting(WebHostDefaults.ApplicationKey, startupAssemblyName); 72hostBuilder.UseSetting(WebHostDefaults.ApplicationKey, startupAssemblyName); 102hostBuilder.UseSetting(WebHostDefaults.ApplicationKey, startupAssemblyName); 145hostBuilder.UseSetting(WebHostDefaults.ApplicationKey, startupAssemblyName);
Microsoft.AspNetCore.Hosting.Abstractions (11)
HostingAbstractionsWebHostBuilderExtensions.cs (11)
28hostBuilder.UseSetting(setting.Key, setting.Value); 43return hostBuilder.UseSetting(WebHostDefaults.CaptureStartupErrorsKey, captureStartupErrors ? "true" : "false"); 58.UseSetting(WebHostDefaults.ApplicationKey, startupAssemblyName) 59.UseSetting(WebHostDefaults.StartupAssemblyKey, startupAssemblyName); 90return hostBuilder.UseSetting(WebHostDefaults.EnvironmentKey, environment); 103return hostBuilder.UseSetting(WebHostDefaults.ContentRootKey, contentRoot); 116return hostBuilder.UseSetting(WebHostDefaults.WebRootKey, webRoot); 129return hostBuilder.UseSetting(WebHostDefaults.ServerUrlsKey, string.Join(';', urls)); 141return hostBuilder.UseSetting(WebHostDefaults.PreferHostingUrlsKey, preferHostingUrls ? "true" : "false"); 152return hostBuilder.UseSetting(WebHostDefaults.SuppressStatusMessagesKey, suppressStatusMessages ? "true" : "false"); 163return hostBuilder.UseSetting(WebHostDefaults.ShutdownTimeoutKey, ((int)timeout.TotalSeconds).ToString(CultureInfo.InvariantCulture));
Microsoft.AspNetCore.Hosting.Tests (17)
WebHostBuilderTests.cs (17)
378.UseSetting("key1", "value1") 491.UseSetting(WebHostDefaults.EnvironmentKey, "EnvA") 492.UseSetting(WebHostDefaults.EnvironmentKey, "EnvB") 517.UseSetting(WebHostDefaults.EnvironmentKey, "EnvA") 544.UseSetting(WebHostDefaults.EnvironmentKey, "EnvB") 890.UseSetting(WebHostDefaults.HostingStartupAssembliesKey, typeof(TestStartupAssembly1.TestHostingStartup1).GetTypeInfo().Assembly.FullName) 910.UseSetting(WebHostDefaults.HostingStartupAssembliesKey, fullName + ";" + name) 927.UseSetting(WebHostDefaults.HostingStartupAssembliesKey, typeof(TestStartupAssembly1.TestHostingStartup1).GetTypeInfo().Assembly.FullName) 947.UseSetting(WebHostDefaults.HostingStartupAssembliesKey, typeof(WebHostBuilderTests).GetTypeInfo().Assembly.FullName) 948.UseSetting(WebHostDefaults.ApplicationKey, startupAssemblyName) 1047.UseSetting(WebHostDefaults.HostingStartupAssembliesKey, typeof(TestStartupAssembly1.TestHostingStartup1).GetTypeInfo().Assembly.FullName) 1048.UseSetting(WebHostDefaults.HostingStartupExcludeAssembliesKey, typeof(TestStartupAssembly1.TestHostingStartup1).GetTypeInfo().Assembly.FullName) 1165.UseSetting(WebHostDefaults.PreventHostingStartupKey, "true") 1181.UseSetting(WebHostDefaults.HostingStartupAssembliesKey, "SomeBogusName") 1202.UseSetting(WebHostDefaults.HostingStartupAssembliesKey, "SomeBogusName") 1677builder.UseSetting("testhostingstartup", "0") 1678.UseSetting("testhostingstartup_chain", builder.GetSetting("testhostingstartup_chain") + "0")
Microsoft.AspNetCore.HttpsPolicy.Tests (1)
HttpsRedirectionMiddlewareTests.cs (1)
210webHostBuilder.UseSetting("HTTPS_PORT", configHttpsPort);
Microsoft.AspNetCore.Mvc.FunctionalTests (7)
RoutingDynamicOrderTest.cs (6)
38.WithWebHostBuilder(b => b.UseSetting("Scenario", RoutingWebSite.StartupForDynamicOrder.DynamicOrderScenarios.AttributeRouteDynamicRoute)); 60.WithWebHostBuilder(b => b.UseSetting("Scenario", RoutingWebSite.StartupForDynamicOrder.DynamicOrderScenarios.MultipleDynamicRoute)); 83.WithWebHostBuilder(b => b.UseSetting("Scenario", RoutingWebSite.StartupForDynamicOrder.DynamicOrderScenarios.ConventionalRouteDynamicRoute)); 105.WithWebHostBuilder(b => b.UseSetting("Scenario", RoutingWebSite.StartupForDynamicOrder.DynamicOrderScenarios.ConventionalRouteDynamicRoute)); 128.WithWebHostBuilder(b => b.UseSetting("Scenario", RoutingWebSite.StartupForDynamicOrder.DynamicOrderScenarios.DynamicControllerAndPages)); 149.WithWebHostBuilder(b => b.UseSetting("Scenario", RoutingWebSite.StartupForDynamicOrder.DynamicOrderScenarios.DynamicControllerAndPages));
SimpleWithWebApplicationBuilderTests.cs (1)
206builder.UseSetting(WebHostDefaults.WebRootKey, webRoot);
Microsoft.AspNetCore.Server.IISIntegration (2)
WebHostBuilderIISExtensions.cs (2)
57hostBuilder.UseSetting(nameof(UseIISIntegration), true.ToString()); 84hostBuilder.UseSetting(WebHostDefaults.ServerUrlsKey, address);
Microsoft.AspNetCore.Server.IISIntegration.Tests (38)
IISExtensionTests.cs (3)
25.UseSetting("TOKEN", "TestToken") 26.UseSetting("PORT", "12345") 27.UseSetting("APPL_PATH", "/")
IISMiddlewareTests.cs (35)
33.UseSetting("PORT", "12345") 34.UseSetting("APPL_PATH", "/") 70.UseSetting("TOKEN", "TestToken") 71.UseSetting("PORT", "12345") 72.UseSetting("APPL_PATH", "/") 111.UseSetting("TOKEN", "TestToken") 112.UseSetting("PORT", "12345") 113.UseSetting("APPL_PATH", pathBase) 170.UseSetting("TOKEN", "TestToken") 171.UseSetting("PORT", "12345") 172.UseSetting("APPL_PATH", "/") 215.UseSetting("TOKEN", "TestToken") 216.UseSetting("PORT", "12345") 217.UseSetting("APPL_PATH", "/") 260.UseSetting("TOKEN", "TestToken") 261.UseSetting("PORT", "12345") 262.UseSetting("APPL_PATH", "/") 300.UseSetting("TOKEN", "TestToken") 301.UseSetting("PORT", "12345") 302.UseSetting("APPL_PATH", "/") 333.UseSetting("TOKEN", "TestToken") 334.UseSetting("PORT", "12345") 335.UseSetting("APPL_PATH", "/pathBase") 362.UseSetting("TOKEN", "TestToken") 363.UseSetting("PORT", "12345") 364.UseSetting("APPL_PATH", "/pathbase") 400.UseSetting("TOKEN", "TestToken") 401.UseSetting("PORT", "12345") 402.UseSetting("APPL_PATH", "/") 442.UseSetting("TOKEN", "TestToken") 443.UseSetting("PORT", "12345") 444.UseSetting("APPL_PATH", "/") 499.UseSetting("TOKEN", "TestToken") 500.UseSetting("PORT", "12345") 501.UseSetting("APPL_PATH", "/")
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (2)
InMemoryTransportBenchmark.cs (1)
50.UseSetting("preventHostingStartup", "true")
NamedPipesTransportBenchmark.cs (1)
48.UseSetting("preventHostingStartup", "true")
Microsoft.AspNetCore.Server.Kestrel.Tests (2)
HttpsConfigurationTests.cs (2)
33hostBuilder.UseSetting(WebHostDefaults.ServerUrlsKey, address); 67hostBuilder.UseSetting(WebHostDefaults.ServerUrlsKey, $"{httpAddress};{httpsAddress}");
Microsoft.AspNetCore.Tests (1)
WebApplicationTests.cs (1)
1141builder.UseSetting("E", "E");
SignalRSamples (1)
Program.cs (1)
23.UseSetting(WebHostDefaults.PreventHostingStartupKey, "true")
SocialWeather (1)
Program.cs (1)
14.UseSetting(WebHostDefaults.PreventHostingStartupKey, "true")
Sockets.BindTests (2)
src\Servers\Kestrel\shared\test\TransportTestHelpers\TestServer.cs (2)
106.UseSetting(WebHostDefaults.ApplicationKey, typeof(TestServer).Assembly.FullName) 107.UseSetting(WebHostDefaults.ShutdownTimeoutKey, TestConstants.DefaultTimeout.TotalSeconds.ToString(CultureInfo.InvariantCulture))
Sockets.FunctionalTests (2)
src\Servers\Kestrel\shared\test\TransportTestHelpers\TestServer.cs (2)
106.UseSetting(WebHostDefaults.ApplicationKey, typeof(TestServer).Assembly.FullName) 107.UseSetting(WebHostDefaults.ShutdownTimeoutKey, TestConstants.DefaultTimeout.TotalSeconds.ToString(CultureInfo.InvariantCulture))
TestStartupAssembly1 (3)
TestHostingStartup1.cs (3)
23builder.UseSetting("testhostingstartup1", "1"); 24builder.UseSetting("testhostingstartup_chain", builder.GetSetting("testhostingstartup_chain") + "1"); 25builder.UseSetting("testhostingstartup1_calls", numCalls.ToString(CultureInfo.InvariantCulture));