Implemented interface member:
property
ServiceProvider
Microsoft.Extensions.DependencyInjection.IServiceScope.ServiceProvider
41 references to ServiceProvider
Aspire.Hosting.RemoteHost (3)
JsonRpcServer.cs (3)
260var clientService = scope.ServiceProvider.GetRequiredService<RemoteAppHostService>(); 261var codeGenerationService = scope.ServiceProvider.GetRequiredService<CodeGenerationService>(); 262var languageService = scope.ServiceProvider.GetRequiredService<LanguageService>();
Aspire.Hosting.RemoteHost.Tests (4)
RemoteHostServerTests.cs (4)
23handleId = firstScope.ServiceProvider.GetRequiredService<HandleRegistry>() 29Assert.False(secondScope.ServiceProvider.GetRequiredService<HandleRegistry>() 43var guestHandles = guestScope.ServiceProvider.GetRequiredService<HandleRegistry>(); 48var integrationHandles = integrationScope.ServiceProvider.GetRequiredService<HandleRegistry>();
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; 806var persistenceManager = _scope.ServiceProvider.GetRequiredService<ComponentStatePersistenceManager>(); 837_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)
1128newHttpContext.RequestServices = connection.ServiceScope.Value.ServiceProvider;
Microsoft.AspNetCore.SignalR.Core (15)
Internal\DefaultHubDispatcher.cs (15)
94var hubActivator = scope.ServiceProvider.GetRequiredService<IHubActivator<THub>>(); 103activity = StartActivity(SignalRServerActivitySource.OnConnected, ActivityKind.Internal, links: null, scope.ServiceProvider, nameof(hub.OnConnectedAsync), headers: null, _logger, connection); 107var context = new HubLifetimeContext(hubCallerContext, scope.ServiceProvider, hub); 131var hubActivator = scope.ServiceProvider.GetRequiredService<IHubActivator<THub>>(); 139activity = StartActivity(SignalRServerActivitySource.OnDisconnected, ActivityKind.Internal, links: null, scope.ServiceProvider, nameof(hub.OnDisconnectedAsync), headers: null, _logger, connection); 143var context = new HubLifetimeContext(hubCallerContext, scope.ServiceProvider, hub); 178var hubActivator = scope.ServiceProvider.GetRequiredService<IHubActivator<THub>>(); 186activity = StartActivity(SignalRServerActivitySource.OnAuthenticationRefreshed, ActivityKind.Internal, links: null, scope.ServiceProvider, nameof(hub.OnAuthenticationRefreshedAsync), headers: null, _logger, connection); 383hubActivator = scope.ServiceProvider.GetRequiredService<IHubActivator<THub>>(); 387if (!await IsHubMethodAuthorized(scope.ServiceProvider, hubCallerContext, descriptor, hubMethodInvocationMessage.Arguments, hub)) 466var activity = StartActivity(SignalRServerActivitySource.InvocationIn, ActivityKind.Server, connection.OriginalActivityLinks, scope.ServiceProvider, hubMethodInvocationMessage.Target, hubMethodInvocationMessage.Headers, logger, connection, descriptor); 487methodExecutor, hub, arguments, hubCallerContext, scope.ServiceProvider); 611var activity = StartActivity(SignalRServerActivitySource.InvocationIn, ActivityKind.Server, connection.OriginalActivityLinks, scope.ServiceProvider, hubMethodInvocationMessage.Target, hubMethodInvocationMessage.Headers, _logger, connection, descriptor); 628result = await ExecuteHubMethod(descriptor.MethodExecutor, hub, arguments, hubCallerContext, scope.ServiceProvider); 863arguments[parameterPointer] = descriptor.GetService(scope.ServiceProvider, parameterPointer, descriptor.OriginalParameterTypes[parameterPointer]);
Microsoft.Extensions.Diagnostics.HealthChecks (1)
DefaultHealthCheckService.cs (1)
81var healthCheck = registration.Factory(scope.ServiceProvider);