Implemented interface member:
property
ApplicationServices
Microsoft.AspNetCore.Builder.IApplicationBuilder.ApplicationServices
14 writes to ApplicationServices
Microsoft.AspNetCore (1)
WebApplication.cs (1)
74set => ApplicationBuilder.ApplicationServices = value;
Microsoft.AspNetCore.Hosting.Tests (13)
StartupManagerTests.cs (13)
301app.ApplicationServices = startup.ConfigureServicesDelegate(serviceCollection); 324app.ApplicationServices = startup.ConfigureServicesDelegate(serviceCollection); 350app.ApplicationServices = startup.ConfigureServicesDelegate(new ServiceCollection()); 397app.ApplicationServices = startup.ConfigureServicesDelegate(new ServiceCollection()); 460app.ApplicationServices = startup.ConfigureServicesDelegate(new ServiceCollection()); 477app.ApplicationServices = startup.ConfigureServicesDelegate(serviceCollection); 495app.ApplicationServices = startup.ConfigureServicesDelegate(serviceCollection); 512app.ApplicationServices = startup.ConfigureServicesDelegate(serviceCollection); 541app.ApplicationServices = startup.ConfigureServicesDelegate(serviceCollection); 556app.ApplicationServices = startup.ConfigureServicesDelegate(serviceCollection); 572app.ApplicationServices = startup.ConfigureServicesDelegate(serviceCollection); 588app.ApplicationServices = startup.ConfigureServicesDelegate(serviceCollection); 634app.ApplicationServices = startup.ConfigureServicesDelegate(serviceCollection);
40 references to ApplicationServices
Microsoft.AspNetCore (1)
WebApplication.cs (1)
73get => ApplicationBuilder.ApplicationServices;
Microsoft.AspNetCore.Hosting.Tests (14)
StartupManagerTests.cs (14)
353var options = app.ApplicationServices.GetRequiredService<IOptions<FakeOptions>>().Value; 400var options = app.ApplicationServices.GetRequiredService<IOptions<FakeOptions>>().Value; 461Assert.NotNull(app.ApplicationServices); 463Assert.NotNull(app.ApplicationServices); 480var foo = app.ApplicationServices.GetRequiredService<StartupWithConfigureServices.IFoo>(); 498var foo = app.ApplicationServices.GetRequiredService<SimpleService>(); 558Assert.IsType<MyContainer>(app.ApplicationServices); 559Assert.True(((MyContainer)app.ApplicationServices).FancyMethodCalled); 574Assert.IsType<MyContainer>(app.ApplicationServices); 575Assert.True(((MyContainer)app.ApplicationServices).FancyMethodCalled); 590Assert.IsType<MyContainer>(app.ApplicationServices); 591Assert.Equal(((MyContainer)app.ApplicationServices).Environment, Environments.Production); 636Assert.NotNull(app.ApplicationServices); 637Assert.IsNotType<MyContainer>(app.ApplicationServices);
Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test (18)
CustomSchemaTest.cs (2)
34using var scope = _builder.ApplicationServices.GetRequiredService<IServiceScopeFactory>().CreateScope(); 42using var scope = _builder.ApplicationServices.GetRequiredService<IServiceScopeFactory>().CreateScope();
DefaultPocoTest.cs (2)
44var userStore = _builder.ApplicationServices.GetRequiredService<IUserStore<IdentityUser>>(); 45var userManager = _builder.ApplicationServices.GetRequiredService<UserManager<IdentityUser>>();
EmptySchemaTest.cs (2)
34using var scope = _builder.ApplicationServices.GetRequiredService<IServiceScopeFactory>().CreateScope(); 42using var scope = _builder.ApplicationServices.GetRequiredService<IServiceScopeFactory>().CreateScope();
MaxKeyLengthSchemaTest.cs (2)
34using (var scope = _builder.ApplicationServices.GetRequiredService<IServiceScopeFactory>().CreateScope()) 52using (var scope = _builder.ApplicationServices.GetRequiredService<IServiceScopeFactory>().CreateScope())
UserOnlyCustomContextTest.cs (2)
89var userStore = _builder.ApplicationServices.GetRequiredService<IUserStore<IdentityUser>>(); 90var userManager = _builder.ApplicationServices.GetRequiredService<UserManager<IdentityUser>>();
UserOnlyTest.cs (4)
50var userStore = _builder.ApplicationServices.GetRequiredService<IUserStore<IdentityUser>>(); 51var userManager = _builder.ApplicationServices.GetRequiredService<UserManager<IdentityUser>>(); 66var userStore = _builder.ApplicationServices.GetRequiredService<IUserStore<IdentityUser>>(); 67var manager = _builder.ApplicationServices.GetRequiredService<UserManager<IdentityUser>>();
VersionOneSchemaTest.cs (2)
36using var scope = _builder.ApplicationServices.GetRequiredService<IServiceScopeFactory>().CreateScope(); 44using var scope = _builder.ApplicationServices.GetRequiredService<IServiceScopeFactory>().CreateScope();
VersionTwoSchemaTest.cs (2)
36var scope = _builder.ApplicationServices.GetRequiredService<IServiceScopeFactory>().CreateScope(); 44using var scope = _builder.ApplicationServices.GetRequiredService<IServiceScopeFactory>().CreateScope();
Microsoft.AspNetCore.Identity.InMemory.Test (4)
ControllerTest.cs (4)
48var userManager = app.ApplicationServices.GetRequiredService<UserManager<PocoUser>>(); 49var signInManager = app.ApplicationServices.GetRequiredService<SignInManager<PocoUser>>(); 98var userManager = app.ApplicationServices.GetRequiredService<UserManager<PocoUser>>(); 99var signInManager = app.ApplicationServices.GetRequiredService<SignInManager<PocoUser>>();
Microsoft.AspNetCore.Mvc.Core.Test (1)
Builder\MvcApplicationBuilderExtensionsTest.cs (1)
53var endpointDataSource = appBuilder.ApplicationServices
Microsoft.AspNetCore.Owin (1)
OwinExtensions.cs (1)
117}, builder.ApplicationServices);
Microsoft.AspNetCore.Routing.Tests (1)
Builder\EndpointRoutingApplicationBuilderExtensionsTest.cs (1)
323var routeOptions = app.ApplicationServices.GetRequiredService<IOptions<RouteOptions>>();