Пример #1
0
 public void Dispose()
 {
     Stop();
     foreach (var job in _jobs.OfType <IDisposable>())
     {
         job.Dispose();
     }
     _timer.Dispose();
     _coordinator.Dispose();
 }
 public void Dispose()
 {
     Stop();
     foreach (IJob job in _jobs)
     {
         // ReSharper disable once SuspiciousTypeConversion.Global
         var disposable = job as IDisposable;
         if (disposable != null)
         {
             disposable.Dispose();
         }
     }
     _timer.Dispose();
     _coordinator.Dispose();
 }