MVVMbasics Logo

mobilemotion.eu Logo


Back to Class Reference home page


MVVMbasics.Services
Class TimerService

MVVMbasics.Services.ITimerService
  implemented by MVVMbasics.Services.TimerService
 

 
[MvvmService]
public class TimerService : ITimerService

Service which provides timer methods.


Method Summary
Guid  StartOnce(TimeSpan interval, Action callback)
Creates a new timer that will run once, and starts it.
Guid  StartLooping(TimeSpan interval, Action callback)
Creates a new timer that will start over again, and starts it.
void  Stop(params Guid[] ids)
Stops some or all timers.
 
Method Detail

Show

public Guid StartOnce(TimeSpan interval, Action callback)

Creates a new timer that will run once, and starts it.

Parameters:

interval - Timer interval.
callback - Method to be executed on the timer tick event.


Show

public Guid StartLooping(TimeSpan interval, Action callback)

Creates a new timer that will start over again, and starts it.

Parameters:

interval - Timer interval.
callback - Method to be executed on each timer tick event.


Show

public void Stop(params Guid[] ids)

Stops some or all timers.

Parameters:

ids - IDs of those timers that shall be stopped and removed. If not provided, all existing timers will be stopped and removed.