C# 클래스 WebApplications.Utilities.Threading.AsyncTimer

상속: IDisposable
파일 보기 프로젝트 열기: webappsuk/CoreLibraries 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
MinimumPeriod System.Duration

공개 메소드들

메소드 설명
AsyncTimer ( [ callback, System.Duration period = null, System.Duration dueTime = null, System.Duration minimumGap = null, PauseToken pauseToken = default(PauseToken), Action errorHandler = null ) : System

Initializes a new instance of the AsyncTimer class.

AsyncTimer ( [ callback, int period = Timeout.Infinite, int dueTime, int minimumGap, PauseToken pauseToken = default(PauseToken), Action errorHandler = null ) : System

Initializes a new instance of the AsyncTimer class.

AsyncTimer ( [ callback, System.Duration period = null, System.Duration dueTime = null, System.Duration minimumGap = null, PauseToken pauseToken = default(PauseToken), Action errorHandler = null ) : System

Initializes a new instance of the AsyncTimer class.

AsyncTimer ( [ callback, int period = Timeout.Infinite, int dueTime, int minimumGap, PauseToken pauseToken = default(PauseToken), Action errorHandler = null ) : System

Initializes a new instance of the AsyncTimer class.

Change ( System.Duration period = null, System.Duration dueTime = null, System.Duration minimumGap = null ) : void

Changes the specified due time and period.

Change ( int period = null, int dueTime = null, int minimumGap = null ) : void

Changes the specified due time and period.

Dispose ( ) : void

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

비공개 메소드들

메소드 설명
ExecuteAsync ( CancellationToken cancellationToken = default(CancellationToken) ) : Task
TimerTask ( CancellationToken cancellationToken ) : Task

The timer task executes the callback asynchronously after set delays.

메소드 상세

AsyncTimer() 공개 메소드

Initializes a new instance of the AsyncTimer class.
public AsyncTimer ( [ callback, System.Duration period = null, System.Duration dueTime = null, System.Duration minimumGap = null, PauseToken pauseToken = default(PauseToken), Action errorHandler = null ) : System
callback [ The asynchronous method to be executed.
period System.Duration The minimum gap between the start of the task invocation and the start of the previous task invocation (defautls to which is equivalent to ).
dueTime System.Duration The due time between the last time the timeouts were changed and the start of the task invocation (defautls to which is equivalent to ).
minimumGap System.Duration The minimum gap between the start of the task invocation and the end of the previous task invocation (defautls to which is equivalent to ).
pauseToken PauseToken The pause token for pasuing the timer.
errorHandler Action The optional error handler.
리턴 System

AsyncTimer() 공개 메소드

Initializes a new instance of the AsyncTimer class.
public AsyncTimer ( [ callback, int period = Timeout.Infinite, int dueTime, int minimumGap, PauseToken pauseToken = default(PauseToken), Action errorHandler = null ) : System
callback [ The callback.
period int The minimum gap (in milliseconds) between the start of the task invocation and the start of the previous task invocation (defaults to ).
dueTime int The due time (in milliseconds) between the last time the timeouts were changed and the start of the task invocation (defaults to 0ms).
minimumGap int The minimum gap (in milliseconds) between the start of the task invocation and the end of the previous task invocation (defaults to 0ms).
pauseToken PauseToken The pause token for pasuing the timer.
errorHandler Action The optional error handler.
리턴 System

AsyncTimer() 공개 메소드

Initializes a new instance of the AsyncTimer class.
public AsyncTimer ( [ callback, System.Duration period = null, System.Duration dueTime = null, System.Duration minimumGap = null, PauseToken pauseToken = default(PauseToken), Action errorHandler = null ) : System
callback [ The asynchronous method to be executed.
period System.Duration The minimum gap between the start of the task invocation and the start of the previous task invocation (defautls to which is equivalent to ).
dueTime System.Duration The due time between the last time the timeouts were changed and the start of the task invocation (defautls to which is equivalent to ).
minimumGap System.Duration The minimum gap between the start of the task invocation and the end of the previous task invocation (defautls to which is equivalent to ).
pauseToken PauseToken The pause token for pasuing the timer.
errorHandler Action The optional error handler.
리턴 System

AsyncTimer() 공개 메소드

Initializes a new instance of the AsyncTimer class.
public AsyncTimer ( [ callback, int period = Timeout.Infinite, int dueTime, int minimumGap, PauseToken pauseToken = default(PauseToken), Action errorHandler = null ) : System
callback [ The callback.
period int The minimum gap (in milliseconds) between the start of the task invocation and the start of the previous task invocation (defaults to ).
dueTime int The due time (in milliseconds) between the last time the timeouts were changed and the start of the task invocation (defaults to 0ms).
minimumGap int The minimum gap (in milliseconds) between the start of the task invocation and the end of the previous task invocation (defaults to 0ms).
pauseToken PauseToken The pause token for pasuing the timer.
errorHandler Action The optional error handler.
리턴 System

Change() 공개 메소드

Changes the specified due time and period.
public Change ( System.Duration period = null, System.Duration dueTime = null, System.Duration minimumGap = null ) : void
period System.Duration The optional minimum gap between the start of the task invocation and the start of the previous task invocation; use to leave the value unchanged.
dueTime System.Duration The optional due time between the last time the timeouts were changed and the start of the task invocation; use to leave the value unchanged.
minimumGap System.Duration The optional minimum gap between the start of the task invocation and the end of the previous task invocation; use to leave the value unchanged.
리턴 void

Change() 공개 메소드

Changes the specified due time and period.
public Change ( int period = null, int dueTime = null, int minimumGap = null ) : void
period int The optional minimum gap (in milliseconds) between the start of the task invocation and the start of the previous task invocation; use to leave the value unchanged.
dueTime int The optional due time (in milliseconds) between the last time the timeouts were changed and the start of the task invocation; use to leave the value unchanged.
minimumGap int The optional minimum gap (in milliseconds) between the start of the task invocation and the end of the previous task invocation; use to leave the value unchanged.
리턴 void

Dispose() 공개 메소드

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
리턴 void

프로퍼티 상세

MinimumPeriod 공개적으로 정적으로 프로퍼티

The minimum period, prevents the timer thrashing too quickly.
public static Duration,System MinimumPeriod
리턴 System.Duration