2 instantiations of AsyncServiceScope
Microsoft.Extensions.DependencyInjection.Abstractions (2)
ServiceProviderServiceExtensions.cs (2)
114return new AsyncServiceScope(provider.CreateScope()); 124return new AsyncServiceScope(serviceScopeFactory.CreateScope());
23 references to AsyncServiceScope
Aspire.Hosting.RemoteHost (1)
JsonRpcServer.cs (1)
192var scope = _scopeFactory.CreateAsyncScope();
Microsoft.AspNetCore.Components (1)
OwningComponentBase.cs (1)
19private AsyncServiceScope? _scope;
Microsoft.AspNetCore.Components.Server (3)
Circuits\CircuitFactory.cs (1)
50var scope = _scopeFactory.CreateAsyncScope();
Circuits\CircuitHost.cs (2)
23private readonly AsyncServiceScope _scope; 49AsyncServiceScope scope,
Microsoft.AspNetCore.Diagnostics (2)
ExceptionHandler\ExceptionHandlerMiddlewareImpl.cs (1)
146await using AsyncServiceScope? scope = _options.CreateScopeForErrors ? context.RequestServices.GetRequiredService<IServiceScopeFactory>().CreateAsyncScope() : null;
StatusCodePage\StatusCodePagesExtensions.cs (1)
232await using AsyncServiceScope? scope = context.Options.CreateScopeForStatusCodePages
Microsoft.AspNetCore.Http.Connections (1)
Internal\HttpConnectionContext.cs (1)
131internal AsyncServiceScope? ServiceScope { get; set; }
Microsoft.AspNetCore.SignalR.Core (7)
Internal\DefaultHubDispatcher.cs (7)
85await using var scope = _serviceScopeFactory.CreateAsyncScope(); 121await using var scope = _serviceScopeFactory.CreateAsyncScope(); 325var scope = _serviceScopeFactory.CreateAsyncScope(); 389AsyncServiceScope scope, 493THub? hub, AsyncServiceScope scope) 511private async Task StreamAsync(string invocationId, HubConnectionContext connection, object?[] arguments, AsyncServiceScope scope, 719HubConnectionContext connection, AsyncServiceScope scope, ref object?[] arguments, out CancellationTokenSource? cts)
Microsoft.Extensions.DependencyInjection.Abstractions (7)
AsyncServiceScope.cs (1)
19/// Initializes a new instance of the <see cref="AsyncServiceScope"/> struct.
ServiceProviderServiceExtensions.cs (6)
108/// Creates a new <see cref="AsyncServiceScope"/> that can be used to resolve scoped services. 111/// <returns>An <see cref="AsyncServiceScope"/> that can be used to resolve scoped services.</returns> 112public static AsyncServiceScope CreateAsyncScope(this IServiceProvider provider) 118/// Creates a new <see cref="AsyncServiceScope"/> that can be used to resolve scoped services. 121/// <returns>An <see cref="AsyncServiceScope"/> that can be used to resolve scoped services.</returns> 122public static AsyncServiceScope CreateAsyncScope(this IServiceScopeFactory serviceScopeFactory)
Microsoft.Extensions.Diagnostics.HealthChecks (1)
DefaultHealthCheckService.cs (1)
78var scope = _scopeFactory.CreateAsyncScope();