<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.0-preview.7.24405.7" />

AsyncServiceScope

A IServiceScope implementation that implements IAsyncDisposable.

The used to resolve dependencies from the scope.

public AsyncServiceScope(IServiceScope serviceScope)

Initializes a new instance of the AsyncServiceScope struct. Wraps an instance of IServiceScope.

public void Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously.