IAsyncState 介面

定義

封裝變數中異步流程 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)

嘗試從狀態取得儲存的異步內容。

適用於