Exemplo n.º 1
0
 public void Register(Task t)
 {
     if (t.Interval.TotalMilliseconds == 0)
     {
         (_timer as DispatcherTimerProxy).BeginInvoke(t.Execution);
     }
     else
     {
         _queue.Add(t);
         changeTimerInterval();
     }
 }
Exemplo n.º 2
0
 public void UnRegister(Task t)
 {
     _queue.RemoveAll(t1 => t.Execution == t1.Execution);
     changeTimerInterval();
 }