IAsyncState 接口
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
将异步流中的所有信息封装在变量 AsyncLocal<T> 中。 此接口的某些实现可能不是线程安全的。
public interface class IAsyncState
public interface IAsyncState
type IAsyncState = interface
Public Interface IAsyncState
方法
| Get(AsyncStateToken) |
从状态中获取存储的异步上下文。 |
| Initialize() |
初始化当前异步流中的异步状态。 |
| RegisterAsyncContext() |
向 状态注册新的异步上下文。 |
| Reset() |
使用后重置异步状态。 |
| Set(AsyncStateToken, Object) |
存储异步上下文。 |
| TryGet(AsyncStateToken, Object) |
尝试从 状态获取存储的异步上下文。 |