Class DispatcherObject
- Namespace
- nanoFramework.UI.Threading
- Assembly
- nanoFramework.Graphics.dll
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
- Inheritance
-
DispatcherObject
- Derived
- Inherited Members
- Extension Methods
Remarks
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.Constructors
DispatcherObject()
Instantiate this object associated with the current Dispatcher.
protected DispatcherObject()
Fields
Dispatcher
The Dispatcher that this DispatcherObject is associated with.
public readonly Dispatcher Dispatcher
Field Value
Methods
CheckAccess()
Checks that the calling thread has access to this object.
public bool CheckAccess()
Returns
- bool
True if the calling thread has access to this object.
Remarks
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.VerifyAccess()
Verifies that the calling thread has access to this object.
public void VerifyAccess()
Remarks
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.