Пример #1
0
        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();
        }
Пример #2
0
 public virtual void OnCompletion()
 {
     OnCompletionEvent?.Invoke(AssetID);
 }