Example #1
0
 protected virtual void Dispose(bool disposing)
 {
     if (disposing)
     {
         _laterService?.Dispose();
         _manager?.Dispose();
         _timeoutBus.Dispose();
         _publishQueue?.Stop();//TODO: do we need to flush/empty the queue here?
     }
 }
Example #2
0
 protected virtual void Dispose(bool disposing)
 {
     if (_disposed)
     {
         return;
     }
     if (disposing)
     {
         _messageQueue.RequestStop();
         _subscriptions?.ForEach(s => s.Dispose());
         _internalBus?.Dispose();
         _disposed = true;
     }
 }