英語で読む

次の方法で共有


AsyncServiceScope Struct

Definition

An IServiceScope implementation that implements IAsyncDisposable.

C#
public readonly struct AsyncServiceScope : IAsyncDisposable, IDisposable, Microsoft.Extensions.DependencyInjection.IServiceScope
Inheritance
AsyncServiceScope
Implements

Constructors

AsyncServiceScope(IServiceScope)

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

Properties

ServiceProvider

The IServiceProvider used to resolve dependencies from the scope.

Methods

Dispose()

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

DisposeAsync()

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

Extension Methods

ConfigureAwait(IAsyncDisposable, Boolean)

Configures how awaits on the tasks returned from an async disposable will be performed.

Applies to

製品 バージョン
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Standard 2.0 (package-provided), 2.1 (package-provided)