AsyncServiceScope 结构
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
实现 IServiceScope 的 IAsyncDisposable实现。
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(IServiceScope) |
初始化 AsyncServiceScope 结构的新实例。 包装 IServiceScope 的实例。 |
属性
ServiceProvider |
用于解析作用域中的依赖项的 IServiceProvider。 |
方法
Dispose() |
执行与释放或重置非托管资源关联的应用程序定义的任务。 |
DisposeAsync() |
以异步方式执行与释放或重置非托管资源相关的应用程序定义的任务。 |
扩展方法
ConfigureAwait(IAsyncDisposable, Boolean) |
配置如何执行从异步可处置项返回的任务的等待。 |
适用于
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈