Implemented interface member:
property
ServiceProvider
Microsoft.Extensions.DependencyInjection.IServiceScope.ServiceProvider
35 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)
81Services = scope.ServiceProvider; 795var persistenceManager = _scope.ServiceProvider.GetRequiredService<ComponentStatePersistenceManager>(); 826_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)
1143newHttpContext.RequestServices = connection.ServiceScope.Value.ServiceProvider;
Microsoft.AspNetCore.SignalR.Core (15)
Internal\DefaultHubDispatcher.cs (15)
87var hubActivator = scope.ServiceProvider.GetRequiredService<IHubActivator<THub>>(); 96activity = StartActivity(SignalRServerActivitySource.OnConnected, ActivityKind.Internal, linkedActivity: null, scope.ServiceProvider, nameof(hub.OnConnectedAsync), headers: null, _logger, connection); 100var context = new HubLifetimeContext(hubCallerContext, scope.ServiceProvider, hub); 124var hubActivator = scope.ServiceProvider.GetRequiredService<IHubActivator<THub>>(); 132activity = StartActivity(SignalRServerActivitySource.OnDisconnected, ActivityKind.Internal, linkedActivity: null, scope.ServiceProvider, nameof(hub.OnDisconnectedAsync), headers: null, _logger, connection); 136var context = new HubLifetimeContext(hubCallerContext, scope.ServiceProvider, hub); 171var hubActivator = scope.ServiceProvider.GetRequiredService<IHubActivator<THub>>(); 179activity = StartActivity(SignalRServerActivitySource.OnAuthenticationRefreshed, ActivityKind.Internal, linkedActivity: null, scope.ServiceProvider, nameof(hub.OnAuthenticationRefreshedAsync), headers: null, _logger, connection); 375hubActivator = scope.ServiceProvider.GetRequiredService<IHubActivator<THub>>(); 379if (!await IsHubMethodAuthorized(scope.ServiceProvider, hubCallerContext, descriptor, hubMethodInvocationMessage.Arguments, hub)) 456var activity = StartActivity(SignalRServerActivitySource.InvocationIn, ActivityKind.Server, connection.OriginalActivity, scope.ServiceProvider, hubMethodInvocationMessage.Target, hubMethodInvocationMessage.Headers, logger, connection); 477methodExecutor, hub, arguments, hubCallerContext, scope.ServiceProvider); 600var activity = StartActivity(SignalRServerActivitySource.InvocationIn, ActivityKind.Server, connection.OriginalActivity, scope.ServiceProvider, hubMethodInvocationMessage.Target, hubMethodInvocationMessage.Headers, _logger, connection); 616result = await ExecuteHubMethod(descriptor.MethodExecutor, hub, arguments, hubCallerContext, scope.ServiceProvider); 830arguments[parameterPointer] = descriptor.GetService(scope.ServiceProvider, parameterPointer, descriptor.OriginalParameterTypes[parameterPointer]);
Microsoft.Extensions.Diagnostics.HealthChecks (1)
DefaultHealthCheckService.cs (1)
81var healthCheck = registration.Factory(scope.ServiceProvider);