Search Results for

    Show / Hide Table of Contents

    Class DispatcherObject

    A DispatcherObject is an object associated with a Dispatcher. A DispatcherObject instance should only be access by the dispatcher's thread.

    Inheritance
    object
    DispatcherObject
    DrawingContext
    PresentationSource
    UIElement
    Application
    InputDevice
    InputManager
    InputManager.DeviceEvents
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: nanoFramework.UI.Threading
    Assembly: nanoFramework.Graphics.dll
    Syntax
    public abstract class DispatcherObject
    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.

    Declaration
    protected DispatcherObject()

    Fields

    Dispatcher

    The Dispatcher that this DispatcherObject is associated with.

    Declaration
    public readonly Dispatcher Dispatcher
    Field Value
    Type Description
    Dispatcher

    Methods

    CheckAccess()

    Checks that the calling thread has access to this object.

    Declaration
    public bool CheckAccess()
    Returns
    Type Description
    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.

    Declaration
    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.

    Extension Methods

    LogDispatcher.GetCurrentClassLogger(object)
    LogDispatcher.GetCurrentClassLogger(object)
    LogDispatcher.GetCurrentClassLogger(object)
    LogDispatcher.GetCurrentClassLogger(object)
    LogDispatcher.GetCurrentClassLogger(object)
    LogDispatcher.GetCurrentClassLogger(object)
    LogDispatcher.GetCurrentClassLogger(object)
    LogDispatcher.GetCurrentClassLogger(object)
    LogDispatcher.GetCurrentClassLogger(object)
    LogDispatcher.GetCurrentClassLogger(object)
    In This Article
    Back to top Copyright © 2023 nanoFramework Contributors
    Generated by DocFX