Пример #1
0
 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));
             }
         }
     }
 }
Пример #2
0
 private void EnterSuspended()
 {
     EnsureUnsubscribed();
     _masterProjectionResponseReader?.Stop();
     _publisher.Publish(new CoreProjectionStatusMessage.Suspended(_projectionCorrelationId));
 }