private void InternalStop(bool unregister) { if (unregister) { _directory.Unregister(this); } _stoppingStrategy.Stop(_transport, _messageDispatcher); IsRunning = false; _subscriptions.Clear(); _messageIdToTaskCompletionSources.Clear(); }
public virtual void Stop() { if (!_isRunning) { throw new InvalidOperationException("Unable to stop, the bus is not running"); } Stopping(); _directory.Unregister(this); _stoppingStrategy.Stop(_transport, _messageDispatcher); _isRunning = false; _subscriptions.Clear(); _messageIdToTaskCompletionSources.Clear(); _completionResultTaskScheduler.Dispose(); Stopped(); }
public virtual void Stop() { if (!_isRunning) { return; } Stopping(); _directory.Unregister(this); _isRunning = false; _stoppingStrategy.Stop(_transport, _messageDispatcher); _subscriptions.Clear(); _messageIdToTaskCompletionSources.Clear(); _completionResultTaskScheduler.Dispose(); Stopped(); }