11 instantiations of AsyncServiceScope
Microsoft.AspNetCore.Components.Server.Tests (9)
Circuits\CircuitHostTest.cs (6)
31serviceScope: new AsyncServiceScope(serviceScope.Object), 56serviceScope: new AsyncServiceScope(serviceScope.Object), 80serviceScope: new AsyncServiceScope(serviceScope.Object), 103serviceScope: new AsyncServiceScope(serviceScope.Object), 133serviceScope: new AsyncServiceScope(serviceScope.Object), 233serviceScope: new AsyncServiceScope(serviceScope.Object),
Circuits\ComponentHubTest.cs (2)
160serviceScope: new AsyncServiceScope(serviceScope.Object)); 209var circuitHost = TestCircuitHost.Create(serviceScope: new AsyncServiceScope(serviceScope.Object));
Circuits\TestCircuitHost.cs (1)
29serviceScope = serviceScope ?? new AsyncServiceScope(Mock.Of<IServiceScope>());
Microsoft.Extensions.DependencyInjection.Abstractions (2)
ServiceProviderServiceExtensions.cs (2)
114return new AsyncServiceScope(provider.CreateScope()); 124return new AsyncServiceScope(serviceScopeFactory.CreateScope());
32 references to AsyncServiceScope
Microsoft.AspNetCore.Components (1)
OwningComponentBase.cs (1)
19private AsyncServiceScope? _scope;
Microsoft.AspNetCore.Components.Server (5)
Circuits\CircuitFactory.cs (2)
46var scope = _scopeFactory.CreateAsyncScope(); 117private static void RestoreAntiforgeryToken(AsyncServiceScope scope)
Circuits\CircuitHost.cs (3)
22private readonly AsyncServiceScope _scope; 42AsyncServiceScope scope, 807private static void RestoreAntiforgeryToken(AsyncServiceScope scope)
Microsoft.AspNetCore.Components.Server.Tests (2)
Circuits\TestCircuitHost.cs (2)
16private TestCircuitHost(CircuitId circuitId, AsyncServiceScope scope, CircuitOptions options, CircuitClientProxy client, RemoteRenderer renderer, IReadOnlyList<ComponentDescriptor> descriptors, RemoteJSRuntime jsRuntime, RemoteNavigationManager navigationManager, CircuitHandler[] circuitHandlers, ILogger logger) 23AsyncServiceScope? serviceScope = null,
Microsoft.AspNetCore.Components.WebAssembly (3)
Hosting\WebAssemblyHost.cs (2)
25private readonly AsyncServiceScope _scope; 47AsyncServiceScope scope,
Hosting\WebAssemblyHostBuilder.cs (1)
292var scope = services.GetRequiredService<IServiceScopeFactory>().CreateAsyncScope();
Microsoft.AspNetCore.Components.WebView (3)
PageContext.cs (2)
24private readonly AsyncServiceScope _serviceScope; 33AsyncServiceScope serviceScope,
WebViewManager.cs (1)
224var serviceScope = _provider.CreateAsyncScope();
Microsoft.AspNetCore.Diagnostics (1)
ExceptionHandler\ExceptionHandlerMiddlewareImpl.cs (1)
147await using AsyncServiceScope? scope = _options.CreateScopeForErrors ? context.RequestServices.GetRequiredService<IServiceScopeFactory>().CreateAsyncScope() : null;
Microsoft.AspNetCore.Http.Connections (1)
Internal\HttpConnectionContext.cs (1)
131internal AsyncServiceScope? ServiceScope { get; set; }
Microsoft.AspNetCore.Mvc.FunctionalTests (1)
TestingInfrastructureInheritanceTests.cs (1)
86using var scope = factory.Services.CreateAsyncScope();
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();