8 instantiations of WebApplicationBuilder
Microsoft.AspNetCore (8)
WebApplication.cs (8)
96new WebApplicationBuilder(new() { Args = args }).Build(); 103new(new()); 110new(new(), slim: true); 118new(new() { Args = args }); 126new(new() { Args = args }, slim: true); 134new(options); 142new(options, slim: true); 150new(options, slim: false, empty: true);
272 references to WebApplicationBuilder
ApiGateway (1)
Program.cs (1)
1var builder = WebApplication.CreateBuilder(args);
Aspire.Dashboard (5)
DashboardWebApplication.cs (5)
112Action<WebApplicationBuilder>? preConfigureBuilder = null, 115var builder = options is not null ? WebApplication.CreateBuilder(options) : WebApplication.CreateBuilder(); 482private static bool TryGetDashboardOptions(WebApplicationBuilder builder, IConfigurationSection dashboardConfigSection, [NotNullWhen(true)] out DashboardOptions? dashboardOptions, [NotNullWhen(false)] out IEnumerable<string>? failureMessages) 502private void ConfigureKestrelEndpoints(WebApplicationBuilder builder, DashboardOptions dashboardOptions) 670private static void ConfigureAuthentication(WebApplicationBuilder builder, DashboardOptions dashboardOptions)
Aspire.Dashboard.Tests (5)
Integration\DashboardClientAuthTests.cs (1)
72var serverAppBuilder = WebApplication.CreateSlimBuilder();
Integration\IntegrationTestHelpers.cs (2)
42Action<WebApplicationBuilder>? preConfigureBuilder = null, 54Action<WebApplicationBuilder>? preConfigureBuilder = null,
Integration\StartupTests.cs (2)
158WebApplicationBuilder? localBuilder = null; 193WebApplicationBuilder? localBuilder = null;
Aspire.Hosting (1)
Dashboard\DashboardServiceHost.cs (1)
70var builder = WebApplication.CreateSlimBuilder();
AzureContainerApps.ApiService (1)
Program.cs (1)
9var builder = WebApplication.CreateBuilder(args);
AzureFunctionsEndToEnd.ApiService (1)
Program.cs (1)
11var builder = WebApplication.CreateBuilder(args);
AzureSearch.ApiService (1)
Program.cs (1)
12var builder = WebApplication.CreateBuilder(args);
AzureStorageEndToEnd.ApiService (1)
Program.cs (1)
7var builder = WebApplication.CreateBuilder(args);
BasketService (1)
Program.cs (1)
3var builder = WebApplication.CreateBuilder(args);
BicepSample.ApiService (1)
Program.cs (1)
13var builder = WebApplication.CreateBuilder(args);
Binding.Http.IntegrationTests (1)
MtomBindingTestHelper.cs (1)
43var builder = WebApplication.CreateBuilder();
BlazorUnitedApp (1)
Program.cs (1)
7var builder = WebApplication.CreateBuilder(args);
BrowserTelemetry.Web (1)
Program.cs (1)
4var builder = WebApplication.CreateBuilder(args);
CatalogDb (1)
Program.cs (1)
3var builder = WebApplication.CreateBuilder(args);
CatalogService (1)
Program.cs (1)
4var builder = WebApplication.CreateBuilder(args);
CdkSample.ApiService (1)
Program.cs (1)
15var builder = WebApplication.CreateBuilder(args);
CookieSample (1)
Program.cs (1)
9var builder = WebApplication.CreateBuilder(args);
CosmosEndToEnd.ApiService (1)
Program.cs (1)
8var builder = WebApplication.CreateBuilder(args);
DaprServiceA (1)
Program.cs (1)
7var builder = WebApplication.CreateBuilder(args);
DaprServiceB (1)
Program.cs (1)
6var builder = WebApplication.CreateBuilder(args);
DatabaseMigration.ApiService (1)
Program.cs (1)
6var builder = WebApplication.CreateBuilder(args);
Elasticsearch.ApiService (1)
Program.cs (1)
7var builder = WebApplication.CreateBuilder(args);
EventHubsApi (1)
Program.cs (1)
4var builder = WebApplication.CreateBuilder(args);
GetDocumentSample (1)
Program.cs (1)
10var builder = WebApplication.CreateBuilder(args);
IdentitySample.ApiEndpoints (1)
Program.cs (1)
13var builder = WebApplication.CreateBuilder(args);
Keycloak.ApiService (1)
Program.cs (1)
1var builder = WebApplication.CreateBuilder(args);
Keycloak.Web (1)
Program.cs (1)
8var builder = WebApplication.CreateBuilder(args);
Microsoft.AspNetCore (34)
ConfigureHostBuilder.cs (5)
13/// A non-buildable <see cref="IHostBuilder"/> for <see cref="WebApplicationBuilder"/>. 14/// Use <see cref="WebApplicationBuilder.Build"/> to build the <see cref="WebApplicationBuilder"/>. 40throw new NotSupportedException($"Call {nameof(WebApplicationBuilder)}.{nameof(WebApplicationBuilder.Build)}() instead.");
ConfigureWebHostBuilder.cs (5)
13/// A non-buildable <see cref="IWebHostBuilder"/> for <see cref="WebApplicationBuilder"/>. 14/// Use <see cref="WebApplicationBuilder.Build"/> to build the <see cref="WebApplicationBuilder"/>. 33throw new NotSupportedException($"Call {nameof(WebApplicationBuilder)}.{nameof(WebApplicationBuilder.Build)}() instead.");
WebApplication.cs (24)
99/// Initializes a new instance of the <see cref="WebApplicationBuilder"/> class with preconfigured defaults. 101/// <returns>The <see cref="WebApplicationBuilder"/>.</returns> 102public static WebApplicationBuilder CreateBuilder() => 106/// Initializes a new instance of the <see cref="WebApplicationBuilder"/> class with minimal defaults. 108/// <returns>The <see cref="WebApplicationBuilder"/>.</returns> 109public static WebApplicationBuilder CreateSlimBuilder() => 113/// Initializes a new instance of the <see cref="WebApplicationBuilder"/> class with preconfigured defaults. 116/// <returns>The <see cref="WebApplicationBuilder"/>.</returns> 117public static WebApplicationBuilder CreateBuilder(string[] args) => 121/// Initializes a new instance of the <see cref="WebApplicationBuilder"/> class with minimal defaults. 124/// <returns>The <see cref="WebApplicationBuilder"/>.</returns> 125public static WebApplicationBuilder CreateSlimBuilder(string[] args) => 129/// Initializes a new instance of the <see cref="WebApplicationBuilder"/> class with preconfigured defaults. 131/// <param name="options">The <see cref="WebApplicationOptions"/> to configure the <see cref="WebApplicationBuilder"/>.</param> 132/// <returns>The <see cref="WebApplicationBuilder"/>.</returns> 133public static WebApplicationBuilder CreateBuilder(WebApplicationOptions options) => 137/// Initializes a new instance of the <see cref="WebApplicationBuilder"/> class with minimal defaults. 139/// <param name="options">The <see cref="WebApplicationOptions"/> to configure the <see cref="WebApplicationBuilder"/>.</param> 140/// <returns>The <see cref="WebApplicationBuilder"/>.</returns> 141public static WebApplicationBuilder CreateSlimBuilder(WebApplicationOptions options) => 145/// Initializes a new instance of the <see cref="WebApplicationBuilder"/> class with no defaults. 147/// <param name="options">The <see cref="WebApplicationOptions"/> to configure the <see cref="WebApplicationBuilder"/>.</param> 148/// <returns>The <see cref="WebApplicationBuilder"/>.</returns> 149public static WebApplicationBuilder CreateEmptyBuilder(WebApplicationOptions options) =>
Microsoft.AspNetCore.Authentication.Test (2)
AuthenticationMiddlewareTests.cs (2)
159var builder = WebApplication.CreateBuilder(); 187var builder = WebApplication.CreateBuilder();
Microsoft.AspNetCore.Authorization.Test (1)
AuthorizationMiddlewareTests.cs (1)
977var builder = WebApplication.CreateBuilder(new WebApplicationOptions()
Microsoft.AspNetCore.Diagnostics.Tests (6)
ExceptionHandlerTest.cs (4)
778var builder = WebApplication.CreateBuilder(); 829var builder = WebApplication.CreateBuilder(); 883var builder = WebApplication.CreateBuilder(); 935var builder = WebApplication.CreateBuilder();
StatusCodeMiddlewareTest.cs (2)
250var builder = WebApplication.CreateBuilder(); 286var builder = WebApplication.CreateBuilder();
Microsoft.AspNetCore.FunctionalTests (1)
WebApplicationFunctionalTests.cs (1)
116var builder = WebApplication.CreateBuilder(new WebApplicationOptions
Microsoft.AspNetCore.Http.Abstractions.Tests (3)
UsePathBaseExtensionsTests.cs (3)
144var builder = WebApplication.CreateBuilder(); 169var builder = WebApplication.CreateBuilder(); 191var builder = WebApplication.CreateBuilder();
Microsoft.AspNetCore.Http.Extensions.Tests (2)
HttpResponseJsonExtensionsTests.cs (2)
491var builder = WebApplication.CreateBuilder(); 524var builder = WebApplication.CreateBuilder();
Microsoft.AspNetCore.Identity.FunctionalTests (1)
MapIdentityApiTests.cs (1)
1281var builder = WebApplication.CreateSlimBuilder();
Microsoft.AspNetCore.Mvc.FunctionalTests (6)
AntiforgeryMiddlewareTest.cs (6)
25var builder = WebApplication.CreateBuilder(); 57var builder = WebApplication.CreateBuilder(); 71var builder = WebApplication.CreateBuilder(); 98var builder = WebApplication.CreateBuilder(); 141var builder = WebApplication.CreateBuilder(); 173var builder = WebApplication.CreateBuilder();
Microsoft.AspNetCore.OpenApi (8)
Extensions\OpenApiServiceCollectionExtensions.cs (8)
24/// This method is commonly used to add OpenAPI services to the <see cref="WebApplicationBuilder.Services"/> 25/// of a <see cref="WebApplicationBuilder"/>, as shown in the following example: 45/// This method is commonly used to add OpenAPI services to the <see cref="WebApplicationBuilder.Services"/> 46/// of a <see cref="WebApplicationBuilder"/>, as shown in the following example: 75/// This method is commonly used to add OpenAPI services to the <see cref="WebApplicationBuilder.Services"/> 76/// of a <see cref="WebApplicationBuilder"/>, as shown in the following example: 93/// This method is commonly used to add OpenAPI services to the <see cref="WebApplicationBuilder.Services"/> 94/// of a <see cref="WebApplicationBuilder"/>, as shown in the following example:
Microsoft.AspNetCore.Rewrite.Tests (6)
MiddlewareTests.cs (6)
847var builder = WebApplication.CreateBuilder(); 882var builder = WebApplication.CreateBuilder(); 918var builder = WebApplication.CreateBuilder(); 954var builder = WebApplication.CreateBuilder(); 991var builder = WebApplication.CreateBuilder(); 1028var builder = WebApplication.CreateBuilder();
Microsoft.AspNetCore.StaticAssets.Tests (9)
StaticAssetsIntegrationTests.cs (9)
36var builder = WebApplication.CreateEmptyBuilder(new WebApplicationOptions 86var builder = WebApplication.CreateEmptyBuilder(new WebApplicationOptions 137var builder = WebApplication.CreateEmptyBuilder(new WebApplicationOptions 189var builder = WebApplication.CreateEmptyBuilder(new WebApplicationOptions 246var builder = WebApplication.CreateEmptyBuilder(new WebApplicationOptions 301var builder = WebApplication.CreateEmptyBuilder(new WebApplicationOptions 357var builder = WebApplication.CreateEmptyBuilder(new WebApplicationOptions 410var builder = WebApplication.CreateEmptyBuilder(new WebApplicationOptions 590var builder = WebApplication.CreateEmptyBuilder(new WebApplicationOptions
Microsoft.AspNetCore.Tests (118)
WebApplicationTests.cs (118)
43public delegate WebApplicationBuilder CreateBuilderFunc(); 44public delegate WebApplicationBuilder CreateBuilderArgsFunc(string[] args); 45public delegate WebApplicationBuilder CreateBuilderOptionsFunc(WebApplicationOptions options); 46public delegate WebApplicationBuilder WebApplicationBuilderConstructorFunc(WebApplicationOptions options, Action<IHostBuilder> configureDefaults); 48private static WebApplicationBuilder CreateBuilder() => WebApplication.CreateBuilder(); 49private static WebApplicationBuilder CreateSlimBuilder() => WebApplication.CreateSlimBuilder(); 50private static WebApplicationBuilder CreateEmptyBuilder() 52var builder = WebApplication.CreateEmptyBuilder(new()); 78private static WebApplicationBuilder CreateBuilderArgs(string[] args) => WebApplication.CreateBuilder(args); 79private static WebApplicationBuilder CreateSlimBuilderArgs(string[] args) => WebApplication.CreateSlimBuilder(args); 80private static WebApplicationBuilder CreateEmptyBuilderArgs(string[] args) 82var builder = WebApplication.CreateEmptyBuilder(new() { Args = args }); 108private static WebApplicationBuilder CreateBuilderOptions(WebApplicationOptions options) => WebApplication.CreateBuilder(options); 109private static WebApplicationBuilder CreateSlimBuilderOptions(WebApplicationOptions options) => WebApplication.CreateSlimBuilder(options); 110private static WebApplicationBuilder CreateEmptyBuilderOptions(WebApplicationOptions options) 112var builder = WebApplication.CreateEmptyBuilder(options); 138private static WebApplicationBuilder WebApplicationBuilderConstructor(WebApplicationOptions options, Action<IHostBuilder> configureDefaults) 140private static WebApplicationBuilder WebApplicationSlimBuilderConstructor(WebApplicationOptions options, Action<IHostBuilder> configureDefaults) 142private static WebApplicationBuilder WebApplicationEmptyBuilderConstructor(WebApplicationOptions options, Action<IHostBuilder> configureDefaults) 144var builder = new WebApplicationBuilder(options, slim: false, empty: true, configureDefaults); 164var builder = createBuilder(new string[] { "--urls", "http://localhost:5001" }); 175var builder = createBuilder(new string[] { "--urls", "http://localhost:5001" }); 198var builder = createBuilder(); 217var builder = createBuilder(); 236var builder = createBuilder(); 256var builder = createBuilder(); 278var builder = createBuilder(); 289var builder = createBuilder(); 351var builder = createBuilder(); 362var builder = createBuilder(); 387var builder = createBuilder(); 407var builder = createBuilder(); 469var builder = createBuilder(new WebApplicationOptions 512var builder = createBuilder(options); 541var builder = createBuilder(options); 583var builder = createBuilder(options); 614var builder = createBuilder(new WebApplicationOptions 649var builder = createBuilder(); 674var builder = createBuilder(); 802var builder = createBuilder( 851var builder = createBuilder( 897var builder = createBuilder( 926var builder = createBuilder( 968var builder = createBuilder( 1027var builder = createBuilder(args); 1041var builder = createBuilder(new[] { "--x=1", "--name=Larry", "--age=20", "--environment=Testing" }); 1075var builder = createBuilder(); 1096var builder = createBuilder(); 1153var builder = createBuilder(); 1199var builder = createBuilder(); 1238var builder = createBuilder(new WebApplicationOptions 1276var builder = createBuilder(); 1300var builder = createBuilder(); 1332var builder = createBuilder(); 1342var builder = createBuilder(); 1354var builder = createBuilder(); 1385var builder = createBuilder(); 1401var builder = createBuilder(); 1418var builder = createBuilder(); 1440var builder = createBuilder(); 1471var builder = createBuilder(); 1501var builder = createBuilder(); 1520var builder = createBuilder(); 1547var builder = createBuilder(); 1575var builder = createBuilder(); 1614var builder = createBuilder(); 1645var builder = createBuilder(); 1664var builder = createBuilder(); 1686var builder = createBuilder(); 1713var builder = createBuilder(); 1751var builder = createBuilder(); 1771var builder = WebApplication.CreateEmptyBuilder(new()); 1787var builder = createBuilder(new[] { "--environment", "Development" }); 1801var builder = CreateEmptyBuilderArgs(new[] { "--environment", "Development" }); 1814var builder = createBuilder(); 1829var builder = createBuilder(); 1858var builder = createBuilder(); 1885var builder = createBuilder(); 1921var builder = createBuilder(); 1948var builder = createBuilder(); 2013var builder = createBuilder(); 2027var builder = createBuilder(new WebApplicationOptions() { EnvironmentName = Environments.Development }); 2049var builder = createBuilder(new WebApplicationOptions() { EnvironmentName = Environments.Development }); 2067var builder = createBuilder(new WebApplicationOptions() { EnvironmentName = Environments.Production }); 2074var builder = CreateEmptyBuilderOptions(new WebApplicationOptions() { EnvironmentName = Environments.Development }); 2078private async Task DeveloperExceptionPageIsNotOn(WebApplicationBuilder builder) 2098var builder = WebApplication.CreateBuilder(new WebApplicationOptions { ApplicationName = typeof(WebApplicationTests).Assembly.FullName }); 2108var builder = WebApplication.CreateBuilder(new[] { "--applicationName", typeof(WebApplicationTests).Assembly.FullName }); 2123var builder = WebApplication.CreateBuilder(options); 2133var builder = createBuilder(new WebApplicationOptions() { EnvironmentName = Environments.Development }); 2158var builder = createBuilder(new WebApplicationOptions() { EnvironmentName = Environments.Production }); 2182var builder = createBuilder(); 2224var builder = createBuilder(); 2245var builder = createBuilder(); 2275var builder = createBuilder(new WebApplicationOptions 2305var builder = createBuilder(); 2322var builder = createBuilder(); 2339var builder = createBuilder(); 2353var builder = createBuilder(); 2367var builder = createBuilder(); 2385var builder = createBuilder(); 2398var builder = createBuilder(); 2419var builder = createBuilder(); 2437var builder = createBuilder(); 2478var builder = createBuilder(); 2516var builder = createBuilder(); 2538var builder = WebApplication.CreateBuilder(); 2564var builder = WebApplication.CreateSlimBuilder(); 2590var builder = WebApplication.CreateSlimBuilder(); 2616var builder = WebApplication.CreateSlimBuilder(); 2643var builder = WebApplication.CreateSlimBuilder(); 2680var builder = WebApplication.CreateBuilder(); 2711var builder = WebApplication.CreateBuilder(); 2731var builder = WebApplication.CreateBuilder(); 2759var builder = WebApplication.CreateBuilder(); 2777var builder = WebApplication.CreateBuilder(); 2800var builder = WebApplication.CreateBuilder(); 2820var builder = WebApplication.CreateBuilder();
MilvusPlayground.ApiService (1)
Program.cs (1)
3var builder = WebApplication.CreateBuilder(args);
MinimalFormSample (1)
Program.cs (1)
8var builder = WebApplication.CreateBuilder(args);
MinimalJwtBearerSample (1)
Program.cs (1)
6var builder = WebApplication.CreateBuilder(args);
MinimalOpenIdConnectSample (1)
Program.cs (1)
5var builder = WebApplication.CreateBuilder(args);
MinimalSample (1)
Program.cs (1)
9var builder = WebApplication.CreateBuilder(args);
Mongo.ApiService (1)
Program.cs (1)
8var builder = WebApplication.CreateBuilder(args);
MvcFormSample (1)
Program.cs (1)
4var builder = WebApplication.CreateBuilder(args);
MyFrontend (1)
Program.cs (1)
5var builder = WebApplication.CreateBuilder(args);
MySql.ApiService (1)
Program.cs (1)
7var builder = WebApplication.CreateBuilder(args);
Nats.ApiService (1)
Program.cs (1)
6var builder = WebApplication.CreateBuilder(args);
Nats.Backend (1)
Program.cs (1)
4var builder = WebApplication.CreateBuilder(args);
OpenAIEndToEnd.WebStory (1)
Program.cs (1)
6var builder = WebApplication.CreateBuilder(args);
OracleEndToEnd.ApiService (1)
Program.cs (1)
7var builder = WebApplication.CreateBuilder(args);
OrleansClient (1)
Program.cs (1)
3var builder = WebApplication.CreateBuilder(args);
OrleansServer (1)
Program.cs (1)
3var builder = WebApplication.CreateBuilder(args);
OutputCachingSample (1)
Startup.cs (1)
7var builder = WebApplication.CreateBuilder(args);
ParameterEndToEnd.ApiService (1)
Program.cs (1)
6var builder = WebApplication.CreateBuilder(args);
PostgresEndToEnd.ApiService (1)
Program.cs (1)
6var builder = WebApplication.CreateBuilder(args);
ProxylessEndToEnd.ApiService (1)
Program.cs (1)
6var builder = WebApplication.CreateBuilder(args);
Qdrant.ApiService (1)
Program.cs (1)
4var builder = WebApplication.CreateBuilder(args);
RateLimitingSample (1)
Program.cs (1)
13var builder = WebApplication.CreateBuilder(args);
Redis.ApiService (1)
Program.cs (1)
6var builder = WebApplication.CreateBuilder(args);
Sample (1)
Program.cs (1)
11var builder = WebApplication.CreateBuilder(args);
Seq.ApiService (1)
Program.cs (1)
6var builder = WebApplication.CreateBuilder(args);
SignalRWeb (1)
Program.cs (1)
1var builder = WebApplication.CreateBuilder(args);
SimpleWebSiteWithWebApplicationBuilder (1)
Program.cs (1)
8var builder = WebApplication.CreateBuilder(args);
SqlServerEndToEnd.ApiService (1)
Program.cs (1)
7var builder = WebApplication.CreateBuilder(args);
SqlServerEndToEnd.DbSetup (1)
Program.cs (1)
7var builder = WebApplication.CreateBuilder(args);
Stress.ApiService (1)
Program.cs (1)
12var builder = WebApplication.CreateBuilder(args);
TestingAppHost1.MyWebApp (1)
Program.cs (1)
4var builder = WebApplication.CreateBuilder(args);
TestProject.IntegrationServiceA (1)
Program.cs (1)
6var builder = WebApplication.CreateBuilder(args);
TestProject.ServiceA (1)
Program.cs (1)
7var builder = WebApplication.CreateBuilder(args);
TestProject.ServiceB (1)
Program.cs (1)
4var builder = WebApplication.CreateBuilder(args);
TestProject.ServiceC (1)
Program.cs (1)
4var builder = WebApplication.CreateBuilder(args);
WaitFor.Frontend (1)
Program.cs (1)
6var builder = WebApplication.CreateBuilder(args);
WaitForSandbox.ApiService (1)
Program.cs (1)
7var builder = WebApplication.CreateBuilder(args);
WaitForSandbox.DbSetup (1)
Program.cs (1)
6var builder = WebApplication.CreateBuilder(args);
WebPubSubWeb (1)
Program.cs (1)
3var builder = WebApplication.CreateBuilder(args);
WebTransportInteractiveSampleApp (1)
Program.cs (1)
14var builder = WebApplication.CreateBuilder(args);
WebTransportSampleApp (1)
Program.cs (1)
11var builder = WebApplication.CreateBuilder(args);