8 references to TryAddScoped
Microsoft.AspNetCore.Components.Endpoints (3)
DependencyInjection\RazorComponentsServiceCollectionExtensions.cs (3)
59services.TryAddScoped<IComponentPrerenderer>(services => services.GetRequiredService<EndpointHtmlRenderer>()); 65services.TryAddScoped<PersistentComponentState>(sp => sp.GetRequiredService<ComponentStatePersistenceManager>().State); 70services.TryAddScoped<IRoutingStateProvider>(sp => sp.GetRequiredService<EndpointRoutingStateProvider>());
Microsoft.AspNetCore.Components.Server (1)
DependencyInjection\ComponentServiceCollectionExtensions.cs (1)
73services.TryAddScoped(s => s.GetRequiredService<ICircuitAccessor>().Circuit);
Microsoft.AspNetCore.Diagnostics.Middleware (1)
Latency\RequestLatencyTelemetryServiceCollectionExtensions.cs (1)
40services.TryAddScoped(p => p.GetRequiredService<ILatencyContextProvider>().CreateContext());
Microsoft.Maui (3)
Hosting\Animations\AppHostBuilderExtensions.cs (2)
19 builder.Services.TryAddScoped<ITicker>(svcs => new PlatformTicker()); 21 builder.Services.TryAddScoped<IAnimationManager>(svcs => new AnimationManager(svcs.GetRequiredService<ITicker>()));
Hosting\Dispatching\AppHostBuilderExtensions.cs (1)
25 builder.Services.TryAddScoped<IDispatcher>((svc) => GetDispatcher(svc, true));