C# 클래스 Open.Core.Common.DelayedAction

Invokes an action after a delay times out (cancelling any previous actions that may be pending).
This can be used to invoke something after a series of rapid events have fired, like key-strokes size changed.
상속: DisposableBase
파일 보기 프로젝트 열기: philcockfield/Open.TestHarness.SL 1 사용 예제들

공개 메소드들

메소드 설명
DelayedAction ( double delaySeconds, System.Action action ) : System
Invoke ( double delay, System.Action action ) : DelayedAction

Invokes the given action after the specified delay.

Returns the 'DelayedAction' used to invoke the method (can be used to cancel the delayed invoke operation).

Start ( ) : void

Starts the delay timer. Subsequent calls to this method restart the timer.

Stop ( ) : void

Stops the timer.

보호된 메소드들

메소드 설명
OnDisposed ( ) : void

비공개 메소드들

메소드 설명
CreateTimer ( ) : DispatcherTimer
InvokeAction ( ) : void
OnActionInvoked ( ) : void
OnStarted ( ) : void
OnStopped ( ) : void
OnTimerElapsed ( object sender, EventArgs e ) : void
SetDelay ( DispatcherTimer targetTimer ) : void

메소드 상세

DelayedAction() 공개 메소드

public DelayedAction ( double delaySeconds, System.Action action ) : System
delaySeconds double
action System.Action
리턴 System

Invoke() 공개 정적인 메소드

Invokes the given action after the specified delay.
Returns the 'DelayedAction' used to invoke the method (can be used to cancel the delayed invoke operation).
public static Invoke ( double delay, System.Action action ) : DelayedAction
delay double The delay (in seconds) before invoking the action.
action System.Action The action to invoke.
리턴 DelayedAction

OnDisposed() 보호된 메소드

protected OnDisposed ( ) : void
리턴 void

Start() 공개 메소드

Starts the delay timer. Subsequent calls to this method restart the timer.
public Start ( ) : void
리턴 void

Stop() 공개 메소드

Stops the timer.
public Stop ( ) : void
리턴 void