C# Class _3PA.Lib.ReccurentAction

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

Public Methods

Method 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

Method Description
OnTick ( object sender, System.Timers.ElapsedEventArgs elapsedEventArgs ) : void

This method every time the timer ticks

Method Details

CleanAll() public static method

Clean all recurrent actions started
public static CleanAll ( ) : void
return void

Dispose() public method

public Dispose ( ) : void
return void

ReccurentAction() public method

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
return System

Stop() public method

Stop the recurrent action
public Stop ( ) : void
return void