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).
파일 보기 프로젝트 열기: b9chris/ASP.Net-Long-Running-Interval-Task 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
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