56 references to AddScoped
Aspire.Dashboard (4)
DashboardWebApplication.cs (4)
253builder.Services.AddScoped<ThemeManager>(); 255builder.Services.AddScoped<ShortcutManager>(); 259builder.Services.AddScoped<BrowserTimeProvider>(); 265builder.Services.AddScoped<DimensionManager>();
BasicTestApp (1)
Program.cs (1)
42builder.Services.AddScoped<PreserveStateService>();
BasicWebSite (4)
Startup.cs (2)
21services.AddScoped<RequestIdService>(); 22services.AddScoped<TestResponseGenerator>();
StartupWithoutEndpointRouting.cs (2)
49services.AddScoped<RequestIdService>(); 51services.AddScoped<TestResponseGenerator>();
GenericHostWebSite (1)
Startup.cs (1)
25services.AddScoped<TestResponseGenerator>();
Microsoft.AspNetCore.Components.Endpoints.Tests (1)
EndpointHtmlRendererTest.cs (1)
1683services.AddScoped<ResourceCollectionProvider>();
Microsoft.AspNetCore.Components.WebAssembly.Tests (6)
Hosting\WebAssemblyHostBuilderTest.cs (6)
42builder.Services.AddScoped<StringBuilder>(); 57builder.Services.AddScoped<StringBuilder>(); 75builder.Services.AddScoped<StringBuilder>(); 80builder.ServiceCollection.AddScoped<List<string>>(); 98builder.Services.AddScoped<StringBuilder>(); 115builder.Services.AddScoped<StringBuilder>();
Microsoft.AspNetCore.Components.WebView.Test (2)
WebViewManagerTests.cs (2)
86.AddScoped<AsyncDisposableService>() 115return new ServiceCollection().AddSingleton<SingletonService>().AddScoped<ScopedService>();
Microsoft.AspNetCore.Hosting.Tests (3)
StartupManagerTests.cs (1)
316serviceCollection.AddScoped<DisposableService>();
WebHostBuilderTests.cs (2)
221s.AddScoped<ServiceC>(); 246s.AddScoped<ServiceC>();
Microsoft.AspNetCore.Mvc.FunctionalTests (1)
TestingInfrastructureInheritanceTests.cs (1)
113.ConfigureServices(s => s.AddScoped<DisposableService>());
Microsoft.AspNetCore.Mvc.TagHelpers.Test (4)
ComponentTagHelperTest.cs (3)
87.AddScoped<ServerComponentSerializer>() 91.AddScoped<ComponentStatePersistenceManager>() 93.AddScoped<HttpContextFormDataProvider>()
PersistComponentStateTagHelperTest.cs (1)
263.AddScoped<ComponentStatePersistenceManager>()
Microsoft.AspNetCore.OpenApi.Tests (6)
Transformers\DocumentTransformerTests.cs (1)
194var serviceCollection = new ServiceCollection().AddScoped<Dependency>();
Transformers\OperationTransformerTests.cs (1)
431var serviceCollection = new ServiceCollection().AddScoped<Dependency>();
Transformers\SchemaTransformerTests.cs (1)
788var serviceCollection = new ServiceCollection().AddScoped<Dependency>();
Transformers\TypeBasedTransformerLifetimeTests.cs (3)
62var serviceCollection = new ServiceCollection().AddScoped<Dependency>(); 160var serviceCollection = new ServiceCollection().AddScoped<Dependency>(); 281var serviceCollection = new ServiceCollection().AddScoped<Dependency>();
Microsoft.AspNetCore.SignalR.Tests (2)
HubConnectionHandlerTests.cs (2)
69s.AddScoped<AsyncDisposable>(); 4978provider.AddScoped<Service2>();
Microsoft.AspNetCore.Tests (2)
WebApplicationTests.cs (2)
1789builder.Services.AddScoped<Service>(); 1803builder.Services.AddScoped<Service>();
Microsoft.Extensions.Diagnostics.HealthChecks.Tests (5)
DefaultHealthCheckServiceTest.cs (5)
387b.Services.AddScoped<AnotherService>(); 412b.Services.AddScoped<CantBeMultiThreadedService>(); 442b.Services.AddScoped<SynchronousDisposable>(); 443b.Services.AddScoped<AsyncOnlyDisposable>(); 444b.Services.AddScoped<SyncOrAsyncDisposable>();
Microsoft.Extensions.Hosting.Testing.Tests (2)
FakeHostBuilderTests.cs (2)
131services.AddScoped<InnerClass>() 149services.AddScoped<InnerClass>()
Microsoft.Extensions.ObjectPool.DependencyInjection.Tests (3)
DependencyInjectionExtensionsTests.cs (3)
213.AddScoped<TestDependency>() 226.AddScoped<Pooled<TestClass>>() 318.AddScoped<Pooled<TestClass>>()
Mvc.RoutingWebSite (8)
Startup.cs (1)
31services.AddScoped<TestResponseGenerator>();
StartupForDynamic.cs (1)
20services.AddScoped<TestResponseGenerator>();
StartupForDynamicOrder.cs (1)
35services.AddScoped<TestResponseGenerator>();
StartupForEndpointFilters.cs (1)
18services.AddScoped<TestResponseGenerator>();
StartupForFallback.cs (1)
18services.AddScoped<TestResponseGenerator>();
StartupForGroups.cs (1)
18services.AddScoped<TestResponseGenerator>();
StartupForLinkGenerator.cs (1)
33services.AddScoped<TestResponseGenerator>();
StartupRoutingDifferentBranches.cs (1)
32services.AddScoped<TestResponseGenerator>();
VersioningWebSite (1)
Startup.cs (1)
16services.AddScoped<TestResponseGenerator>();