DispatcherSynchronizationContext 類別

定義

提供 Windows Presentation Foundation (WPF) 的同步處理內容。Provides a synchronization context for Windows Presentation Foundation (WPF).

public ref class DispatcherSynchronizationContext sealed : System::Threading::SynchronizationContext
public sealed class DispatcherSynchronizationContext : System.Threading.SynchronizationContext
type DispatcherSynchronizationContext = class
    inherit SynchronizationContext
Public NotInheritable Class DispatcherSynchronizationContext
Inherits SynchronizationContext
繼承
DispatcherSynchronizationContext

備註

如果在 Dispatcher 建立實例時未指定 DispatcherSynchronizationContext ,則目前的 Dispatcher 會與關聯 DispatcherSynchronizationContextIf a Dispatcher is not specified at the creation of the DispatcherSynchronizationContext instance, the current Dispatcher is associated with the DispatcherSynchronizationContext.

建構函式

DispatcherSynchronizationContext()

使用目前的 DispatcherSynchronizationContext 來初始化 Dispatcher 類別的執行個體。Initializes a new instance of the DispatcherSynchronizationContext class by using the current Dispatcher.

DispatcherSynchronizationContext(Dispatcher)

使用指定的 DispatcherSynchronizationContext 來初始化 Dispatcher 類別的新執行個體。Initializes a new instance of the DispatcherSynchronizationContext class by using the specified Dispatcher.

DispatcherSynchronizationContext(Dispatcher, DispatcherPriority)

使用指定的 DispatcherSynchronizationContext 來初始化 Dispatcher 類別的新執行個體。Initializes a new instance of the DispatcherSynchronizationContext class by using the specified Dispatcher.

方法

CreateCopy()

建立這個 DispatcherSynchronizationContext 的複本。Creates a copy of this DispatcherSynchronizationContext.

Equals(Object)

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

(繼承來源 Object)
GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(繼承來源 Object)
GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(繼承來源 Object)
IsWaitNotificationRequired()

判斷是否需要等候告知。Determines if wait notification is required.

(繼承來源 SynchronizationContext)
MemberwiseClone()

建立目前 Object 的淺層複製。Creates a shallow copy of the current Object.

(繼承來源 Object)
OperationCompleted()

在衍生類別中覆寫時,會回應作業已經完成的通知。When overridden in a derived class, responds to the notification that an operation has completed.

(繼承來源 SynchronizationContext)
OperationStarted()

在衍生類別中覆寫時,會回應作業已經啟動的通知。When overridden in a derived class, responds to the notification that an operation has started.

(繼承來源 SynchronizationContext)
Post(SendOrPostCallback, Object)

在同步處理內容中以非同步方式叫用回呼。Invokes the callback in the synchronization context asynchronously.

Send(SendOrPostCallback, Object)

在同步處理內容中以同步方式叫用回呼。Invokes the callback in the synchronization context synchronously.

SetWaitNotificationRequired()

設定告知,表示需要等候告知,並準備回呼 (Callback) 方法,以便在發生等候狀況時,可以順利呼叫該方法。Sets notification that wait notification is required and prepares the callback method so it can be called more reliably when a wait occurs.

(繼承來源 SynchronizationContext)
ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(繼承來源 Object)
Wait(IntPtr[], Boolean, Int32)

等候指定陣列中的任何元素或所有元素接收信號。Waits for any or all the elements in the specified array to receive a signal.

適用於