Search Results for

    Show / Hide Table of Contents

    Class Timer

    Defines a timer to use for performing actions on a tick.

    Inheritance
    System.Object
    Timer
    Implements
    ITimer
    IDisposable
    Namespace: MADE.Threading
    Assembly: MADE.Threading.dll
    Syntax
    public class Timer : object, ITimer

    Properties

    | Improve this Doc View Source

    DueTime

    Gets or sets the time before initiating the first Tick event.

    Declaration
    public TimeSpan DueTime { get; set; }
    Property Value
    Type Description
    TimeSpan
    | Improve this Doc View Source

    Interval

    Gets or sets the interval between initiating the Tick event.

    Declaration
    public TimeSpan Interval { get; set; }
    Property Value
    Type Description
    TimeSpan
    | Improve this Doc View Source

    IsRunning

    Gets a value indicating whether the timer is currently running.

    Declaration
    public bool IsRunning { get; }
    Property Value
    Type Description
    System.Boolean

    Methods

    | Improve this Doc View Source

    Dispose()

    Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

    Declaration
    public void Dispose()
    | Improve this Doc View Source

    Dispose(Boolean)

    Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

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

    A value indicating whether the object is being disposed by the method.

    | Improve this Doc View Source

    InvokeTick()

    Invokes the Tick event, if attached.

    Declaration
    protected virtual void InvokeTick()
    | Improve this Doc View Source

    Start()

    Starts the timer.

    Declaration
    public void Start()
    | Improve this Doc View Source

    Start(Int32)

    Starts the timer after the given dueTime in milliseconds.

    Declaration
    public void Start(int dueTime)
    Parameters
    Type Name Description
    System.Int32 dueTime

    The time before initiating the first Tick event in milliseconds.

    | Improve this Doc View Source

    Start(TimeSpan)

    Starts the timer after the given dueTime.

    Declaration
    public void Start(TimeSpan dueTime)
    Parameters
    Type Name Description
    TimeSpan dueTime

    The time before initiating the first Tick event.

    | Improve this Doc View Source

    Stop()

    Stops the timer.

    Declaration
    public void Stop()

    Events

    | Improve this Doc View Source

    Tick

    Occurs when the timer ticks over the specified Interval.

    Declaration
    public event EventHandler<object> Tick
    Event Type
    Type Description
    EventHandler<System.Object>

    Implements

    ITimer
    IDisposable

    Extension Methods

    ReflectionExtensions.GetPropertyValue<T>(Object, String)
    ReflectionExtensions.GetPropertyNames(Object)
    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright (c) MADE Apps