Implemented interface member:
property
ServiceProvider
Microsoft.Extensions.DependencyInjection.IServiceScope.ServiceProvider
34 references to ServiceProvider
Microsoft.AspNetCore.Components (1)
OwningComponentBase.cs (1)
43return _scope.Value.ServiceProvider;
Microsoft.AspNetCore.Components.Server (13)
Circuits\CircuitFactory.cs (9)
47var jsRuntime = (RemoteJSRuntime)scope.ServiceProvider.GetRequiredService<IJSRuntime>(); 50var navigationManager = (RemoteNavigationManager)scope.ServiceProvider.GetRequiredService<NavigationManager>(); 51var navigationInterception = (RemoteNavigationInterception)scope.ServiceProvider.GetRequiredService<INavigationInterception>(); 52var scrollToLocationHash = (RemoteScrollToLocationHash)scope.ServiceProvider.GetRequiredService<IScrollToLocationHash>(); 71var appLifetime = scope.ServiceProvider.GetRequiredService<ComponentStatePersistenceManager>(); 76var serverComponentDeserializer = scope.ServiceProvider.GetRequiredService<IServerComponentDeserializer>(); 79scope.ServiceProvider, 93var circuitHandlers = components.Count == 0 ? [] : scope.ServiceProvider.GetServices<CircuitHandler>() 122var antiforgery = scope.ServiceProvider.GetService<AntiforgeryStateProvider>();
Circuits\CircuitHost.cs (4)
69Services = scope.ServiceProvider; 760var appLifetime = _scope.ServiceProvider.GetRequiredService<ComponentStatePersistenceManager>(); 766_circuitHandlers = [.. _scope.ServiceProvider.GetServices<CircuitHandler>().OrderBy(h => h.Order)]; 812var antiforgery = scope.ServiceProvider.GetService<AntiforgeryStateProvider>();
Microsoft.AspNetCore.Components.WebAssembly (2)
Hosting\WebAssemblyHost.cs (2)
68public IServiceProvider Services => _scope.ServiceProvider; 241_scope.ServiceProvider.GetRequiredService<AntiforgeryStateProvider>();
Microsoft.AspNetCore.Components.WebView (1)
PageContext.cs (1)
29public IServiceProvider ServiceProvider => _serviceScope.ServiceProvider;
Microsoft.AspNetCore.Diagnostics (1)
ExceptionHandler\ExceptionHandlerMiddlewareImpl.cs (1)
153context.RequestServices = scope.Value.ServiceProvider;
Microsoft.AspNetCore.Http.Connections (1)
Internal\HttpConnectionDispatcher.cs (1)
765newHttpContext.RequestServices = connection.ServiceScope.Value.ServiceProvider;
Microsoft.AspNetCore.Mvc.FunctionalTests (1)
TestingInfrastructureInheritanceTests.cs (1)
87var sink = scope.ServiceProvider.GetRequiredService<DisposableService>();
Microsoft.AspNetCore.SignalR.Core (13)
Internal\DefaultHubDispatcher.cs (13)
87var hubActivator = scope.ServiceProvider.GetRequiredService<IHubActivator<THub>>(); 95activity = StartActivity(SignalRServerActivitySource.OnConnected, ActivityKind.Internal, linkedActivity: null, scope.ServiceProvider, nameof(hub.OnConnectedAsync), headers: null, _logger); 99var context = new HubLifetimeContext(connection.HubCallerContext, scope.ServiceProvider, hub); 123var hubActivator = scope.ServiceProvider.GetRequiredService<IHubActivator<THub>>(); 130activity = StartActivity(SignalRServerActivitySource.OnDisconnected, ActivityKind.Internal, linkedActivity: null, scope.ServiceProvider, nameof(hub.OnDisconnectedAsync), headers: null, _logger); 134var context = new HubLifetimeContext(connection.HubCallerContext, scope.ServiceProvider, hub); 330hubActivator = scope.ServiceProvider.GetRequiredService<IHubActivator<THub>>(); 333if (!await IsHubMethodAuthorized(scope.ServiceProvider, connection, descriptor, hubMethodInvocationMessage.Arguments, hub)) 407var activity = StartActivity(SignalRServerActivitySource.InvocationIn, ActivityKind.Server, connection.OriginalActivity, scope.ServiceProvider, hubMethodInvocationMessage.Target, hubMethodInvocationMessage.Headers, logger); 412result = await dispatcher.ExecuteHubMethod(methodExecutor, hub, arguments, connection, scope.ServiceProvider); 525var activity = StartActivity(SignalRServerActivitySource.InvocationIn, ActivityKind.Server, connection.OriginalActivity, scope.ServiceProvider, hubMethodInvocationMessage.Target, hubMethodInvocationMessage.Headers, _logger); 539result = await ExecuteHubMethod(descriptor.MethodExecutor, hub, arguments, connection, scope.ServiceProvider); 746arguments[parameterPointer] = descriptor.GetService(scope.ServiceProvider, parameterPointer, descriptor.OriginalParameterTypes[parameterPointer]);
Microsoft.Extensions.Diagnostics.HealthChecks (1)
DefaultHealthCheckService.cs (1)
81var healthCheck = registration.Factory(scope.ServiceProvider);