8 references to TryAddScoped
Microsoft.AspNetCore.Components.Endpoints (3)
DependencyInjection\RazorComponentsServiceCollectionExtensions.cs (3)
59
services.
TryAddScoped
<IComponentPrerenderer>(services => services.GetRequiredService<EndpointHtmlRenderer>());
65
services.
TryAddScoped
<PersistentComponentState>(sp => sp.GetRequiredService<ComponentStatePersistenceManager>().State);
70
services.
TryAddScoped
<IRoutingStateProvider>(sp => sp.GetRequiredService<EndpointRoutingStateProvider>());
Microsoft.AspNetCore.Components.Server (1)
DependencyInjection\ComponentServiceCollectionExtensions.cs (1)
73
services.
TryAddScoped
(s => s.GetRequiredService<ICircuitAccessor>().Circuit);
Microsoft.AspNetCore.Diagnostics.Middleware (1)
Latency\RequestLatencyTelemetryServiceCollectionExtensions.cs (1)
40
services.
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));