protected virtual void Dispose(bool disposing)
        {
            if (!disposing || _disposed)
            {
                return;
            }

            Logger.Debug(Resources.ShuttingDownDispatchScheduler);
            _disposed = true;
            _dispatcher.Dispose();
            _persistence.Dispose();
        }
 public void Dispose()
 {
     _dispatcher.Dispose();
     GC.SuppressFinalize(this);
 }
 public void should_dispose_the_underlying_dispatcher_exactly_once()
 {
     A.CallTo(() => _dispatchCommits.Dispose()).MustHaveHappened(Repeated.Exactly.Once);
 }