Implemented interface member:
property
ServiceProvider
Microsoft.Extensions.DependencyInjection.IServiceScope.ServiceProvider
33 references to ServiceProvider
Aspire.Hosting.RemoteHost (1)
JsonRpcServer.cs (1)
196var clientService = scope.ServiceProvider.GetRequiredService<RemoteAppHostService>();
Microsoft.AspNetCore.Components (1)
OwningComponentBase.cs (1)
43return _scope.Value.ServiceProvider;
Microsoft.AspNetCore.Components.Server (12)
Circuits\CircuitFactory.cs (9)
51var jsRuntime = (RemoteJSRuntime)scope.ServiceProvider.GetRequiredService<IJSRuntime>(); 54var navigationManager = (RemoteNavigationManager)scope.ServiceProvider.GetRequiredService<NavigationManager>(); 55var navigationInterception = (RemoteNavigationInterception)scope.ServiceProvider.GetRequiredService<INavigationInterception>(); 56var scrollToLocationHash = (RemoteScrollToLocationHash)scope.ServiceProvider.GetRequiredService<IScrollToLocationHash>(); 57var circuitActivitySource = scope.ServiceProvider.GetRequiredService<CircuitActivitySource>(); 77var appLifetime = scope.ServiceProvider.GetRequiredService<ComponentStatePersistenceManager>(); 82var serverComponentDeserializer = scope.ServiceProvider.GetRequiredService<IServerComponentDeserializer>(); 85scope.ServiceProvider, 102var circuitHandlers = components.Count == 0 ? [] : scope.ServiceProvider.GetServices<CircuitHandler>()
Circuits\CircuitHost.cs (3)
80Services = scope.ServiceProvider; 794var persistenceManager = _scope.ServiceProvider.GetRequiredService<ComponentStatePersistenceManager>(); 825_circuitHandlers = [.. _scope.ServiceProvider.GetServices<CircuitHandler>().OrderBy(h => h.Order)];
Microsoft.AspNetCore.Components.WebAssembly (1)
Hosting\WebAssemblyHost.cs (1)
67public IServiceProvider Services => _scope.ServiceProvider;
Microsoft.AspNetCore.Components.WebView (1)
PageContext.cs (1)
29public IServiceProvider ServiceProvider => _serviceScope.ServiceProvider;
Microsoft.AspNetCore.Diagnostics (2)
ExceptionHandler\ExceptionHandlerMiddlewareImpl.cs (1)
152context.RequestServices = scope.Value.ServiceProvider;
StatusCodePage\StatusCodePagesExtensions.cs (1)
249context.HttpContext.RequestServices = scope.Value.ServiceProvider;
Microsoft.AspNetCore.Http.Connections (1)
Internal\HttpConnectionDispatcher.cs (1)
770newHttpContext.RequestServices = connection.ServiceScope.Value.ServiceProvider;
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, connection); 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, connection); 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, connection); 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, connection); 539result = await ExecuteHubMethod(descriptor.MethodExecutor, hub, arguments, connection, scope.ServiceProvider); 732arguments[parameterPointer] = descriptor.GetService(scope.ServiceProvider, parameterPointer, descriptor.OriginalParameterTypes[parameterPointer]);
Microsoft.Extensions.Diagnostics.HealthChecks (1)
DefaultHealthCheckService.cs (1)
81var healthCheck = registration.Factory(scope.ServiceProvider);