A DispatcherObject is an object associated with a Dispatcher. A DispatcherObject instance should only be access by the dispatcher's thread.
public abstract class DispatcherObject
Subclasses of DispatcherObject should enforce thread safety by calling VerifyAccess() on all their public methods to ensure the calling thread is the appropriate thread.DispatcherObject cannot be independently instantiated; that is, all constructors are protected.
Instantiate this object associated with the current Dispatcher.
The Dispatcher that this DispatcherObject is associated with.
public readonly Dispatcher Dispatcher
Checks that the calling thread has access to this object.
public bool CheckAccess()
True if the calling thread has access to this object.
Only the dispatcher thread may access DispatcherObjects.This method is public so that any thread can probe to see if it has access to the DispatcherObject.
Verifies that the calling thread has access to this object.
public void VerifyAccess()
Only the dispatcher thread may access DispatcherObjects.This method is public so that derived classes can probe to see if the calling thread has access to itself.
This is only verified in debug builds.