Пример #1
0
 public void Register(Task t)
 {
     if (t.Interval.TotalMilliseconds == 0)
     {
         (_timer as DispatcherTimerProxy).BeginInvoke(t.Execution);
     }
     else
     {
         _queue.Add(t);
         changeTimerInterval();
     }
 }
Пример #2
0
 public void UnRegister(Task t)
 {
     _queue.RemoveAll(t1 => t.Execution == t1.Execution);
     changeTimerInterval();
 }