AsyncFlowControl 結構

定義

提供功能,以還原執行緒間執行內容的移轉或流量。Provides the functionality to restore the migration, or flow, of the execution context between threads.

public value class AsyncFlowControl : IDisposable
public struct AsyncFlowControl : IDisposable
type AsyncFlowControl = struct
    interface IDisposable
Public Structure AsyncFlowControl
Implements IDisposable
繼承
AsyncFlowControl
實作

備註

執行內容包含所有邏輯執行緒的執行相關資訊。An execution context contains all execution-related information for a logical thread. 您可以使用ExecutionContext.SuppressFlow傳回AsyncFlowControl結構的方法, 避免執行內容至其他執行緒的流程。The flow of the execution context to other threads can be prevented by using the ExecutionContext.SuppressFlow method, which returns an AsyncFlowControl structure. Undo 傳回AsyncFlowControl之結構的方法可以用來復原流程隱藏專案。The Undo method of the returned AsyncFlowControl structure can be used to undo the flow suppression. AsyncFlowControl結構必須用於其建立所在的同一個執行緒上。The AsyncFlowControl structure must be used on the same thread on which it was created.

方法

Dispose()

釋放 AsyncFlowControl 類別目前的執行個體所使用的全部資源。Releases all resources used by the current instance of the AsyncFlowControl class.

Equals(AsyncFlowControl)

判斷指定的 AsyncFlowControl 結構和目前的 AsyncFlowControl 結構是否相等。Determines whether the specified AsyncFlowControl structure is equal to the current AsyncFlowControl structure.

Equals(Object)

判斷指定的物件是否等於目前的 AsyncFlowControl 結構。Determines whether the specified object is equal to the current AsyncFlowControl structure.

GetHashCode()

取得目前 AsyncFlowControl 結構的雜湊程式碼。Gets a hash code for the current AsyncFlowControl structure.

Undo()

還原執行內容在執行緒之間的流量。Restores the flow of the execution context between threads.

運算子

Equality(AsyncFlowControl, AsyncFlowControl)

比較兩個 AsyncFlowControl 結構,判斷它們是否相等。Compares two AsyncFlowControl structures to determine whether they are equal.

Inequality(AsyncFlowControl, AsyncFlowControl)

比較兩個 AsyncFlowControl 結構,判斷它們是否不相等。Compares two AsyncFlowControl structures to determine whether they are not equal.

明確介面實作

IDisposable.Dispose()

釋放 AsyncFlowControl 所使用的所有資源。Releases all resources used by the AsyncFlowControl.

適用於