6 writes to ApplicationServices
Microsoft.AspNetCore.Http.Extensions (1)
RequestDelegateFactory.cs (1)
2929ApplicationServices = applicationServices;
Microsoft.AspNetCore.Mvc.Core (3)
Routing\ActionEndpointFactory.cs (3)
108ApplicationServices = _serviceProvider, 154ApplicationServices = _serviceProvider, 225ApplicationServices = _serviceProvider,
Microsoft.AspNetCore.Routing (2)
EndpointDataSource.cs (1)
58ApplicationServices = context.ApplicationServices,
RouteEndpointDataSource.cs (1)
183ApplicationServices = _applicationServices,
165 references to ApplicationServices
Microsoft.AspNetCore.Http.Extensions (2)
RequestDelegateFactory.cs (2)
276var serviceProvider = options?.ServiceProvider ?? options?.EndpointBuilder?.ApplicationServices ?? EmptyServiceProvider.Instance; 490ApplicationServices = factoryContext.EndpointBuilder.ApplicationServices,
Microsoft.AspNetCore.Http.Microbenchmarks (2)
src\Http\Http.Extensions\test\RequestDelegateGenerator\SharedTypes.cs (2)
636if (builder.ApplicationServices.GetRequiredService<MetadataService>() is { } metadataService) 690if (builder.ApplicationServices.GetRequiredService<MetadataService>() is { } metadataService)
Microsoft.AspNetCore.Identity (21)
GeneratedRouteBuilderExtensions.g.cs (21)
85Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found."); 89var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 205Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found."); 209var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 389Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found."); 393var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 506Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found."); 510var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 652Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found."); 656var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 770Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found."); 774var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 886Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found."); 890var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 1003Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found."); 1007var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 1120Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found."); 1124var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 1225Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found."); 1229var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 1348ApplicationServices = builder.ApplicationServices,
Microsoft.AspNetCore.Mvc.Core (1)
Routing\ActionEndpointFactory.cs (1)
470ApplicationServices = builder.ApplicationServices,
Microsoft.AspNetCore.OpenApi (4)
Extensions\OpenApiEndpointConventionBuilderExtensions.cs (1)
106var applicationServices = routeEndpointBuilder.ApplicationServices;
GeneratedRouteBuilderExtensions.g.cs (3)
81Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found."); 85var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 186ApplicationServices = builder.ApplicationServices,
Microsoft.AspNetCore.Routing (3)
RequestDelegateFilterPipelineBuilder.cs (2)
21var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 28ApplicationServices = options.EndpointBuilder.ApplicationServices
RouteEndpointDataSource.cs (1)
244var hasValidationResolvers = builder.ApplicationServices.GetService<IOptions<ValidationOptions>>() is { Value: { } options } && options.Resolvers.Count > 0;
Microsoft.AspNetCore.Routing.Tests (1)
Builder\GroupTest.cs (1)
192endpointBuilderServiceProvider = builder.ApplicationServices;
Sample (131)
artifacts\obj\Sample\Release\net10.0\generated\Microsoft.AspNetCore.Http.RequestDelegateGenerator\Microsoft.AspNetCore.Http.RequestDelegateGenerator.RequestDelegateGenerator\GeneratedRouteBuilderExtensions.g.cs (131)
82Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found."); 86var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 194Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found."); 198var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 315Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found."); 319var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 437Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found."); 441var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 575Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found."); 579var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 660Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found."); 664var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 745Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found."); 749var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 829Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found."); 833var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 916Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found."); 920var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 1003Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found."); 1007var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 1092Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found."); 1096var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 1242var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 1267Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found."); 1271var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 1366var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 1391Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found."); 1395var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 1500Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found."); 1504var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 1615var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 1641Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found."); 1645var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 1737var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 1763Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found."); 1767var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 1867Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found."); 1871var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 1952Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found."); 1956var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 2029var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 2053Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found."); 2057var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 2148var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 2172Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found."); 2176var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 2267var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 2291Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found."); 2295var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 2386var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 2410Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found."); 2414var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 2505var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 2529Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found."); 2533var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 2624var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 2648Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found."); 2652var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 2743var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 2767Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found."); 2771var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 2862var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 2886Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found."); 2890var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 2985var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 3009Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found."); 3013var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 3108var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 3135Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found."); 3139var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 3234var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 3261Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found."); 3265var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 3366Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found."); 3370var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 3446var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 3470Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found."); 3474var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 3569var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 3593Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found."); 3597var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 3692var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 3716Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found."); 3720var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 3822Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found."); 3826var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 3910Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found."); 3914var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 3987var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 4011Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found."); 4015var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 4110var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 4134Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found."); 4138var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 4233var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 4257Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found."); 4261var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 4363Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found."); 4367var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 4450Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found."); 4454var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 4540Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found."); 4544var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 4655var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 4679Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found."); 4683var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 4788Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found."); 4792var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 4911Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found."); 4915var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 4994Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found."); 4998var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 5074var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 5099Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found."); 5103var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 5198var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 5222Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found."); 5226var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 5317var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 5341Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found."); 5345var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 5436var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 5460Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found."); 5464var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 5555var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 5579Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found."); 5583var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 5674var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 5698Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found."); 5702var serviceProvider = options.ServiceProvider ?? options.EndpointBuilder.ApplicationServices; 5807ApplicationServices = builder.ApplicationServices,