C# Class Open.Core.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 or window size changed.
Inheritance: IDisposable
Afficher le fichier Open project: philcockfield/Open.TestHarness.SL Class Usage Examples

Méthodes publiques

Méthode Description
DelayedAction ( double delaySeconds, System.Action action ) : System

Constructor.

Dispose ( ) : void
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.

Private Methods

Méthode Description
FireInvoked ( ) : void
InvokeAction ( ) : void

Method Details

DelayedAction() public méthode

Constructor.
public DelayedAction ( double delaySeconds, System.Action action ) : System
delaySeconds double The time delay in delay (in seconds).
action System.Action The action that is invoked after the delay.
Résultat System

Dispose() public méthode

public Dispose ( ) : void
Résultat void

Invoke() public static méthode

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.
Résultat DelayedAction

Start() public méthode

Starts the delay timer. Subsequent calls to this method restart the timer.
public Start ( ) : void
Résultat void

Stop() public méthode

Stops the timer.
public Stop ( ) : void
Résultat void