20 references to AddScoped
DependencyInjectionApp (1)
Program.cs (1)
22services.AddScoped<IAnotherService, AnotherService>();
HostedBlazorWebassemblyApp.Client (1)
Program.cs (1)
25builder.Services.AddScoped<IWeatherForecastService, HttpWeatherForecastService>();
Microsoft.AspNetCore.Authorization.Test (1)
AuthorizationMiddlewareTests.cs (1)
982builder.Services.AddScoped<IAuthorizationHandler, TestAuthorizationHandler>();
Microsoft.AspNetCore.Components.Server (4)
DependencyInjection\ComponentServiceCollectionExtensions.cs (4)
81services.AddScoped<NavigationManager, RemoteNavigationManager>(); 82services.AddScoped<IJSRuntime, RemoteJSRuntime>(); 83services.AddScoped<INavigationInterception, RemoteNavigationInterception>(); 84services.AddScoped<IScrollToLocationHash, RemoteScrollToLocationHash>();
Microsoft.AspNetCore.Components.Web.Tests (3)
HtmlRendering\HtmlRendererTest.cs (3)
1150})).AddScoped<NavigationManager, TestNavigationManager>()); 1172})).AddScoped<NavigationManager, TestNavigationManager>()); 1377services.AddScoped<NavigationManager, TestNavigationManager>();
Microsoft.AspNetCore.Hosting (1)
WebHostBuilder.cs (1)
293services.AddScoped<IMiddlewareFactory, MiddlewareFactory>();
Microsoft.AspNetCore.Mvc.Razor.Test (1)
RazorViewTest.cs (1)
1790.AddScoped<IViewBufferScope, TestViewBufferScope>()
Microsoft.AspNetCore.Mvc.TagHelpers.Test (2)
ComponentTagHelperTest.cs (1)
86.AddScoped<IComponentPrerenderer, EndpointHtmlRenderer>()
PersistComponentStateTagHelperTest.cs (1)
264.AddScoped<IComponentPrerenderer, EndpointHtmlRenderer>()
Microsoft.AspNetCore.Tests (1)
WebApplicationTests.cs (1)
1819Assert.Throws<InvalidOperationException>(() => builder.Services.AddScoped<IService, Service>());
Microsoft.Extensions.Identity.Core (1)
IdentityBuilder.cs (1)
106Services.AddScoped<IdentityErrorDescriber, TDescriber>();
SecurityWebSite (4)
Startup.cs (1)
24services.AddScoped<IPolicyEvaluator, CountingPolicyEvaluator>();
StartupWithGlobalDenyAnonymousFilter.cs (1)
27services.AddScoped<IPolicyEvaluator, CountingPolicyEvaluator>();
StartupWithGlobalDenyAnonymousFilterWithUseMvc.cs (1)
34services.AddScoped<IPolicyEvaluator, CountingPolicyEvaluator>();
StartupWithUseMvc.cs (1)
23services.AddScoped<IPolicyEvaluator, CountingPolicyEvaluator>();