AsyncServiceScope 结构

定义

实现 IServiceScopeIAsyncDisposable实现。

public value class AsyncServiceScope : IAsyncDisposable, IDisposable, Microsoft::Extensions::DependencyInjection::IServiceScope
public readonly struct AsyncServiceScope : IAsyncDisposable, IDisposable, Microsoft.Extensions.DependencyInjection.IServiceScope
type AsyncServiceScope = struct
    interface IServiceScope
    interface IDisposable
    interface IAsyncDisposable
Public Structure AsyncServiceScope
Implements IAsyncDisposable, IDisposable, IServiceScope
继承
AsyncServiceScope
实现

构造函数

AsyncServiceScope(IServiceScope)

初始化 AsyncServiceScope 结构的新实例。 包装 IServiceScope 的实例。

属性

ServiceProvider

用于解析作用域中的依赖项的 IServiceProvider

方法

Dispose()

执行与释放或重置非托管资源关联的应用程序定义的任务。

DisposeAsync()

以异步方式执行与释放或重置非托管资源相关的应用程序定义的任务。

适用于