/// <summary> /// /// </summary> /// <param name="action"></param> /// <param name="delay"></param> public virtual void InvokeImp(Action action, uint delay) { CancelInvokeImp(action); var param = TimerWrapper.New(Name, action, delay); _timers.Add(action, param); param.Start(); }
/// <summary> /// Internal invoker for Obj /// </summary> /// <param name="action"></param> /// <param name="delay"></param> public override void InvokeImp(Action action, uint delay) { CancelInvoke(action); var timer = TimerWrapper.New("", () => { using (new Flusher(_flushable)) { CancelInvoke(action); action(); } }, delay); AddTimer(action, timer); timer.Start(); }
/// <summary> /// add action /// used internal /// </summary> /// <param name="action"></param> /// <param name="aw"></param> protected void AddTimer(Action action, TimerWrapper aw) => _timers.Add(action, aw);