public void Handle(ProjectionCoreServiceMessage.Stop message) { _readDispatcher.CancelAll(); _writeDispatcher.CancelAll(); var allProjections = _projections.Values; foreach (var projection in allProjections) { projection.Kill(); } if (_subscriptions.Count > 0) { _logger.Info("_subscriptions is not empty after all the projections have been killed"); _subscriptions.Clear(); } if (_projections.Count > 0) { _logger.Info("_projections is not empty after all the projections have been killed"); _projections.Clear(); } if (_distributionPoints.Count > 0) { _logger.Info("_distributionPoints is not empty after all the projections have been killed"); _distributionPoints.Clear(); } if (_projectionDistributionPoints.Count > 0) { _logger.Info("_projectionDistributionPoints is not empty after all the projections have been killed"); _projectionDistributionPoints.Clear(); } if (_distributionPointSubscriptions.Count > 0) { _logger.Info("_distributionPointSubscriptions is not empty after all the projections have been killed"); _distributionPointSubscriptions.Clear(); } _headingEventDistributionPoint.Stop(); _stopped = true; }
public void Handle(ProjectionMessage.CoreService.Stop message) { _headingEventDistributionPoint.Stop(); _stopped = true; }