C# Class ModernApp4Me.WP8.Download.OneShotDispatcherTimer

Provides a one-shot timer integrated to the Dispatcher queue.
Afficher le fichier Open project: smartnsoft/ModernApp4Me Class Usage Examples

Méthodes publiques

Méthode Description
CreateAndStart ( System.TimeSpan duration, EventHandler callback ) : OneShotDispatcherTimer

Creates a new OneShotDispatcherTimer and starts it.

OneShotDispatcherTimer ( ) : System

Initializes a new OneShotDispatcherTimer instance.

Start ( ) : void

Starts the timer. This method has no effect if the timer is already started.

The same OneShotDispatcherTimer instance can be started and stopped multiple times.

Stop ( ) : void

Stops the timer. This method has no effect if the timer is not started.

The Fired event is guaranteed not to be raised once this method has been invoked and until the timer is started again.

Private Methods

Méthode Description
OnTimerTick ( object sender, EventArgs e ) : void

Listens to Tick events on the underlying timer.

RaiseFired ( ) : void

Raises the Fired event.

Method Details

CreateAndStart() public static méthode

Creates a new OneShotDispatcherTimer and starts it.
public static CreateAndStart ( System.TimeSpan duration, EventHandler callback ) : OneShotDispatcherTimer
duration System.TimeSpan The duration of the timer.
callback EventHandler The delegate that will be called when the timer fires.
Résultat OneShotDispatcherTimer

OneShotDispatcherTimer() public méthode

Initializes a new OneShotDispatcherTimer instance.
public OneShotDispatcherTimer ( ) : System
Résultat System

Start() public méthode

Starts the timer. This method has no effect if the timer is already started.
The same OneShotDispatcherTimer instance can be started and stopped multiple times.
public Start ( ) : void
Résultat void

Stop() public méthode

Stops the timer. This method has no effect if the timer is not started.
The Fired event is guaranteed not to be raised once this method has been invoked and until the timer is started again.
public Stop ( ) : void
Résultat void