Search Results for

    Show / Hide Table of Contents

    Class DispatcherTimer

    A timer that is integrated into the Dispatcher queues, and will be processed after a given amount of time

    Inheritance
    object
    DispatcherTimer
    Implements
    IDisposable
    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 class DispatcherTimer : IDisposable

    Constructors

    DispatcherTimer()

    Creates a timer that uses the current thread's Dispatcher to process the timer event

    Declaration
    public DispatcherTimer()

    DispatcherTimer(Dispatcher)

    Creates a timer that uses the specified Dispatcher to process the timer event.

    Declaration
    public DispatcherTimer(Dispatcher dispatcher)
    Parameters
    Type Name Description
    Dispatcher dispatcher

    The dispatcher to use to process the timer.

    Properties

    Dispatcher

    Gets the dispatcher this timer is associated with.

    Declaration
    public Dispatcher Dispatcher { get; }
    Property Value
    Type Description
    Dispatcher

    Interval

    Gets or sets the time between timer ticks.

    Declaration
    public TimeSpan Interval { get; set; }
    Property Value
    Type Description
    TimeSpan

    IsEnabled

    Gets or sets whether the timer is running.

    Declaration
    public bool IsEnabled { get; set; }
    Property Value
    Type Description
    bool

    Tag

    Any data that the caller wants to pass along with the timer.

    Declaration
    public object Tag { get; set; }
    Property Value
    Type Description
    object

    Methods

    Close()

    Declaration
    public virtual void Close()

    Dispose()

    Declaration
    public void Dispose()

    Dispose(bool)

    Declaration
    protected virtual void Dispose(bool disposing)
    Parameters
    Type Name Description
    bool disposing

    Start()

    Starts the timer.

    Declaration
    public void Start()

    Stop()

    Stops the timer.

    Declaration
    public void Stop()

    Events

    Tick

    Occurs when the specified timer interval has elapsed and the timer is enabled.

    Declaration
    public event EventHandler Tick
    Event Type
    Type Description
    EventHandler

    Implements

    IDisposable

    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