C# Класс Brass9.Threading.TimerInfo

A wrapper class for System.Threading.Timer * Eliminates context object to pass in - just use a closure instead. * Allows you to check on the current Interval the timer is set to. * Uses just the one callback per timer - if you need a new callback, make a new TimerInfo. * Simplifies changing schedule of timer. * Easier to check on when it ran (check LastFired).
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
timer System.Threading.Timer
timerCallback System.Action

Открытые методы

Метод Описание
SetInterval ( int milliseconds ) : void
Stop ( ) : void
TimerInfo ( System.Action timerCallback ) : System

Setup a TimerInfo object.

Описание методов

SetInterval() публичный Метод

public SetInterval ( int milliseconds ) : void
milliseconds int
Результат void

Stop() публичный Метод

public Stop ( ) : void
Результат void

TimerInfo() публичный Метод

Setup a TimerInfo object.
public TimerInfo ( System.Action timerCallback ) : System
timerCallback System.Action The Action to call each time the Timer fires. Does away with a context object argument - use a closure instead.
Результат System

Описание свойств

timer защищенное свойство

protected Timer,System.Threading timer
Результат System.Threading.Timer

timerCallback защищенное свойство

protected Action,System timerCallback
Результат System.Action