C# Class _3PA.Lib.ReccurentAction

Allows to do a given action every XXX ms for XXX times
Inheritance: IDisposable
Afficher le fichier Open project: jcaillon/3P Class Usage Examples

Méthodes publiques

Méthode Description
CleanAll ( ) : void

Clean all recurrent actions started

Dispose ( ) : void
ReccurentAction ( System.Action actionToDo, long timeLapse, int nbRepeat, bool doActionOnCreate = true ) : System

Executed ASYNCHRONOUSLY, Allows to do a given action (in a new task) every XXX ms for XXX times by default it does the action when creating this instance, set doActionOnCreate = false to not do it immediatly

Stop ( ) : void

Stop the recurrent action

Private Methods

Méthode Description
OnTick ( object sender, System.Timers.ElapsedEventArgs elapsedEventArgs ) : void

This method every time the timer ticks

Method Details

CleanAll() public static méthode

Clean all recurrent actions started
public static CleanAll ( ) : void
Résultat void

Dispose() public méthode

public Dispose ( ) : void
Résultat void

ReccurentAction() public méthode

Executed ASYNCHRONOUSLY, Allows to do a given action (in a new task) every XXX ms for XXX times by default it does the action when creating this instance, set doActionOnCreate = false to not do it immediatly
public ReccurentAction ( System.Action actionToDo, long timeLapse, int nbRepeat, bool doActionOnCreate = true ) : System
actionToDo System.Action
timeLapse long
nbRepeat int
doActionOnCreate bool
Résultat System

Stop() public méthode

Stop the recurrent action
public Stop ( ) : void
Résultat void