Beispiel #1
0
 /// <summary>
 /// Invoke the all completed event.
 /// </summary>
 protected void InvokeAllCompleted()
 {
     AllCompleted?.Invoke(this,
                          new AllCompleteArguments()
     {
         ElapsedTime            = ElapsedTime,
         ExceptionThrowByRunner = ExceptionThrownByRunner
     });
 }
        public OfflineTimer(string name, TimeSpan interval)
        {
            this.name     = name;
            this.interval = interval;
            Timer         = new CoroutineTimer().WithLoopTime(Convert.ToInt32(interval.TotalSeconds)).WithInfinityLoop();

            Timer.AllCompleted   += () => AllCompleted?.Invoke();
            Timer.TimesUp        += TimerOnTimesUp;
            Timer.SecondsChanged += (i) => SecondsChanged?.Invoke(i);
        }
 void Complete()
 {
     IsCompleted = true;
     updateProcessor.UnsubsribeToUpdate(Update);
     AllCompleted?.Invoke();
 }