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