public AppDotTicker(int delayInterval) { DelayMillisec = delayInterval; new Thread(() => { lock (typeof(T)) { while (true) { if (_shutdown) { OnCompletionEvent?.Invoke(); break; } if (_halt) { continue; } Thread.Sleep(DelayMillisec); OnTickEvent?.Invoke(); } IsActive = false; } }) { IsBackground = true } .Start(); }
public virtual void OnCompletion() { OnCompletionEvent?.Invoke(AssetID); }