Implemented interface member:
property
ServiceProvider
Microsoft.Extensions.DependencyInjection.IServiceScope.ServiceProvider
59 references to ServiceProvider
Microsoft.AspNetCore.Components (1)
OwningComponentBase.cs (1)
43
return _scope.Value.
ServiceProvider
;
Microsoft.AspNetCore.Components.Server (12)
Circuits\CircuitFactory.cs (9)
51
var jsRuntime = (RemoteJSRuntime)scope.
ServiceProvider
.GetRequiredService<IJSRuntime>();
54
var navigationManager = (RemoteNavigationManager)scope.
ServiceProvider
.GetRequiredService<NavigationManager>();
55
var navigationInterception = (RemoteNavigationInterception)scope.
ServiceProvider
.GetRequiredService<INavigationInterception>();
56
var scrollToLocationHash = (RemoteScrollToLocationHash)scope.
ServiceProvider
.GetRequiredService<IScrollToLocationHash>();
57
var circuitActivitySource = scope.
ServiceProvider
.GetRequiredService<CircuitActivitySource>();
77
var appLifetime = scope.
ServiceProvider
.GetRequiredService<ComponentStatePersistenceManager>();
82
var serverComponentDeserializer = scope.
ServiceProvider
.GetRequiredService<IServerComponentDeserializer>();
85
scope.
ServiceProvider
,
101
var circuitHandlers = components.Count == 0 ? [] : scope.
ServiceProvider
.GetServices<CircuitHandler>()
Circuits\CircuitHost.cs (3)
79
Services = scope.
ServiceProvider
;
792
var persistenceManager = _scope.
ServiceProvider
.GetRequiredService<ComponentStatePersistenceManager>();
823
_circuitHandlers = [.. _scope.
ServiceProvider
.GetServices<CircuitHandler>().OrderBy(h => h.Order)];
Microsoft.AspNetCore.Components.Server.Tests (1)
Circuits\CircuitPersistenceManagerTest.cs (1)
429
scope.
ServiceProvider
,
Microsoft.AspNetCore.Components.Tests (24)
PersistentState\PersistentServicesRegistryTest.cs (24)
24
var scope = serviceProvider.CreateAsyncScope().
ServiceProvider
;
41
var secondScope = serviceProvider.CreateAsyncScope().
ServiceProvider
;
69
var scope = serviceProviderOne.CreateAsyncScope().
ServiceProvider
;
83
var scopeTwo = serviceProviderTwo.CreateAsyncScope().
ServiceProvider
;
111
serviceProvider.CreateAsyncScope().
ServiceProvider
);
119
serviceProvider.CreateAsyncScope().
ServiceProvider
);
138
var scope = serviceProvider.CreateAsyncScope().
ServiceProvider
;
168
var scope = serviceProviderOne.CreateAsyncScope().
ServiceProvider
;
183
var scopeTwo = serviceProviderTwo.CreateAsyncScope().
ServiceProvider
;
208
var scope = serviceProviderOne.CreateAsyncScope().
ServiceProvider
;
222
var scopeTwo = serviceProviderTwo.CreateAsyncScope().
ServiceProvider
;
246
var scope = serviceProviderOne.CreateAsyncScope().
ServiceProvider
;
256
var scopeTwo = serviceProviderTwo.CreateAsyncScope().
ServiceProvider
;
322
var scope = serviceProvider.CreateAsyncScope().
ServiceProvider
;
338
var secondScope = serviceProvider.CreateAsyncScope().
ServiceProvider
;
371
var scope = serviceProvider.CreateAsyncScope().
ServiceProvider
;
384
var secondScope = serviceProvider.CreateAsyncScope().
ServiceProvider
;
412
var scope = serviceProvider.CreateAsyncScope().
ServiceProvider
;
426
var initialValueScope = serviceProvider.CreateAsyncScope().
ServiceProvider
;
448
var scope = serviceProvider.CreateAsyncScope().
ServiceProvider
;
462
var lastSnapshotScope = serviceProvider.CreateAsyncScope().
ServiceProvider
;
484
var scope = serviceProvider.CreateAsyncScope().
ServiceProvider
;
498
var updatedScope = serviceProvider.CreateAsyncScope().
ServiceProvider
;
511
var targetScope = serviceProvider.CreateAsyncScope().
ServiceProvider
;
Microsoft.AspNetCore.Components.WebAssembly (1)
Hosting\WebAssemblyHost.cs (1)
66
public IServiceProvider Services => _scope.
ServiceProvider
;
Microsoft.AspNetCore.Components.WebView (1)
PageContext.cs (1)
29
public IServiceProvider ServiceProvider => _serviceScope.
ServiceProvider
;
Microsoft.AspNetCore.Diagnostics (2)
ExceptionHandler\ExceptionHandlerMiddlewareImpl.cs (1)
152
context.RequestServices = scope.Value.
ServiceProvider
;
StatusCodePage\StatusCodePagesExtensions.cs (1)
243
context.HttpContext.RequestServices = scope.Value.
ServiceProvider
;
Microsoft.AspNetCore.Http.Connections (1)
Internal\HttpConnectionDispatcher.cs (1)
765
newHttpContext.RequestServices = connection.ServiceScope.Value.
ServiceProvider
;
Microsoft.AspNetCore.Http.Connections.Tests (1)
HttpConnectionDispatcherTests.cs (1)
3089
Assert.Throws<ObjectDisposedException>(() => connection.ServiceScope.Value.
ServiceProvider
.GetService<MessageWrapper>());
Microsoft.AspNetCore.Mvc.FunctionalTests (1)
TestingInfrastructureInheritanceTests.cs (1)
89
var sink = scope.
ServiceProvider
.GetRequiredService<DisposableService>();
Microsoft.AspNetCore.SignalR.Core (13)
Internal\DefaultHubDispatcher.cs (13)
87
var hubActivator = scope.
ServiceProvider
.GetRequiredService<IHubActivator<THub>>();
95
activity = StartActivity(SignalRServerActivitySource.OnConnected, ActivityKind.Internal, linkedActivity: null, scope.
ServiceProvider
, nameof(hub.OnConnectedAsync), headers: null, _logger);
99
var context = new HubLifetimeContext(connection.HubCallerContext, scope.
ServiceProvider
, hub);
123
var hubActivator = scope.
ServiceProvider
.GetRequiredService<IHubActivator<THub>>();
130
activity = StartActivity(SignalRServerActivitySource.OnDisconnected, ActivityKind.Internal, linkedActivity: null, scope.
ServiceProvider
, nameof(hub.OnDisconnectedAsync), headers: null, _logger);
134
var context = new HubLifetimeContext(connection.HubCallerContext, scope.
ServiceProvider
, hub);
330
hubActivator = scope.
ServiceProvider
.GetRequiredService<IHubActivator<THub>>();
333
if (!await IsHubMethodAuthorized(scope.
ServiceProvider
, connection, descriptor, hubMethodInvocationMessage.Arguments, hub))
407
var activity = StartActivity(SignalRServerActivitySource.InvocationIn, ActivityKind.Server, connection.OriginalActivity, scope.
ServiceProvider
, hubMethodInvocationMessage.Target, hubMethodInvocationMessage.Headers, logger);
412
result = await dispatcher.ExecuteHubMethod(methodExecutor, hub, arguments, connection, scope.
ServiceProvider
);
525
var activity = StartActivity(SignalRServerActivitySource.InvocationIn, ActivityKind.Server, connection.OriginalActivity, scope.
ServiceProvider
, hubMethodInvocationMessage.Target, hubMethodInvocationMessage.Headers, _logger);
539
result = await ExecuteHubMethod(descriptor.MethodExecutor, hub, arguments, connection, scope.
ServiceProvider
);
732
arguments[parameterPointer] = descriptor.GetService(scope.
ServiceProvider
, parameterPointer, descriptor.OriginalParameterTypes[parameterPointer]);
Microsoft.Extensions.Diagnostics.HealthChecks (1)
DefaultHealthCheckService.cs (1)
81
var healthCheck = registration.Factory(scope.
ServiceProvider
);