40 references to TryAddScoped
Microsoft.AspNetCore.Authentication.Core (2)
AuthenticationCoreServiceCollectionExtensions.cs (2)
23services.TryAddScoped<IAuthenticationService, AuthenticationService>(); 25services.TryAddScoped<IAuthenticationHandlerProvider, AuthenticationHandlerProvider>();
Microsoft.AspNetCore.Components.Endpoints (8)
DependencyInjection\RazorComponentsServiceCollectionExtensions.cs (8)
53services.TryAddScoped<IRazorComponentEndpointInvoker, RazorComponentEndpointInvoker>(); 60services.TryAddScoped<NavigationManager, HttpNavigationManager>(); 61services.TryAddScoped<IJSRuntime, UnsupportedJavaScriptRuntime>(); 62services.TryAddScoped<INavigationInterception, UnsupportedNavigationInterception>(); 63services.TryAddScoped<IScrollToLocationHash, UnsupportedScrollToLocationHash>(); 66services.TryAddScoped<IErrorBoundaryLogger, PrerenderingErrorBoundaryLogger>(); 71services.TryAddScoped<AuthenticationStateProvider, ServerAuthenticationStateProvider>(); 79services.TryAddScoped<IFormValueMapper, HttpContextFormValueMapper>();
Microsoft.AspNetCore.Components.Server (5)
DependencyInjection\ComponentServiceCollectionExtensions.cs (5)
69services.TryAddScoped<IServerComponentDeserializer, ServerComponentDeserializer>(); 70services.TryAddScoped<IErrorBoundaryLogger, RemoteErrorBoundaryLogger>(); 71services.TryAddScoped<AntiforgeryStateProvider, DefaultAntiforgeryStateProvider>(); 74services.TryAddScoped<ICircuitAccessor, DefaultCircuitAccessor>(); 85services.TryAddScoped<AuthenticationStateProvider, ServerAuthenticationStateProvider>();
Microsoft.AspNetCore.Components.WebView (5)
ComponentsWebViewServiceCollectionExtensions.cs (5)
26services.TryAddScoped<IJSRuntime, WebViewJSRuntime>(); 27services.TryAddScoped<INavigationInterception, WebViewNavigationInterception>(); 28services.TryAddScoped<IScrollToLocationHash, WebViewScrollToLocationHash>(); 29services.TryAddScoped<NavigationManager, WebViewNavigationManager>(); 30services.TryAddScoped<IErrorBoundaryLogger, WebViewErrorBoundaryLogger>();
Microsoft.AspNetCore.Hosting (2)
GenericHost\GenericWebHostBuilder.cs (1)
80services.TryAddScoped<IMiddlewareFactory, MiddlewareFactory>();
GenericHost\SlimWebHostBuilder.cs (1)
54services.TryAddScoped<IMiddlewareFactory, MiddlewareFactory>();
Microsoft.AspNetCore.Identity (9)
IdentityServiceCollectionExtensions.cs (9)
93services.TryAddScoped<IUserValidator<TUser>, UserValidator<TUser>>(); 94services.TryAddScoped<IPasswordValidator<TUser>, PasswordValidator<TUser>>(); 95services.TryAddScoped<IPasswordHasher<TUser>, PasswordHasher<TUser>>(); 96services.TryAddScoped<ILookupNormalizer, UpperInvariantLookupNormalizer>(); 97services.TryAddScoped<IRoleValidator<TRole>, RoleValidator<TRole>>(); 100services.TryAddScoped<ISecurityStampValidator, SecurityStampValidator<TUser>>(); 102services.TryAddScoped<ITwoFactorSecurityStampValidator, TwoFactorSecurityStampValidator<TUser>>(); 103services.TryAddScoped<IUserClaimsPrincipalFactory<TUser>, UserClaimsPrincipalFactory<TUser, TRole>>(); 104services.TryAddScoped<IUserConfirmation<TUser>, DefaultUserConfirmation<TUser>>();
Microsoft.AspNetCore.Mvc.Razor (1)
DependencyInjection\MvcRazorMvcCoreBuilderExtensions.cs (1)
148services.TryAddScoped<ITagHelperComponentManager, TagHelperComponentManager>();
Microsoft.AspNetCore.Mvc.ViewFeatures (1)
DependencyInjection\MvcViewFeaturesMvcCoreBuilderExtensions.cs (1)
209services.TryAddScoped<IViewBufferScope, MemoryPoolViewBufferScope>();
Microsoft.AspNetCore.Tests (1)
WebApplicationTests.cs (1)
1820Assert.Throws<InvalidOperationException>(() => builder.Services.TryAddScoped<IService, Service>());
Microsoft.Extensions.Identity.Core (6)
IdentityServiceCollectionExtensions.cs (6)
40services.TryAddScoped<IUserValidator<TUser>, UserValidator<TUser>>(); 41services.TryAddScoped<IPasswordValidator<TUser>, PasswordValidator<TUser>>(); 42services.TryAddScoped<IPasswordHasher<TUser>, PasswordHasher<TUser>>(); 43services.TryAddScoped<ILookupNormalizer, UpperInvariantLookupNormalizer>(); 44services.TryAddScoped<IUserConfirmation<TUser>, DefaultUserConfirmation<TUser>>(); 47services.TryAddScoped<IUserClaimsPrincipalFactory<TUser>, UserClaimsPrincipalFactory<TUser>>();