private void StopSlaveProjections() { if (_masterProjectionResponseReader != null) _masterProjectionResponseReader.Stop(); //TODO: encapsulate into StopSlaveProjections message? var slaveProjections = _slaveProjections; if (slaveProjections != null) { _slaveProjections = null; foreach (var group in slaveProjections.Channels) { foreach (var channel in group.Value) { _publisher.Publish( new ProjectionManagementMessage.Command.Delete( new NoopEnvelope(), channel.ManagedProjectionName, ProjectionManagementMessage.RunAs.System, true, true, false)); } } } }
private void EnterSuspended() { EnsureUnsubscribed(); _masterProjectionResponseReader?.Stop(); _publisher.Publish(new CoreProjectionStatusMessage.Suspended(_projectionCorrelationId)); }