private void SendErrorNotification(StartBatchUpload message) { BatchStatusChanged notification = new BatchStatusChanged { BatchId = message.BatchId, BatchSourcePath = message.BatchSourcePath, Status = BatchStatus.Errored }; Bus.Send(Bus.SourceOfMessageBeingHandled, notification); }
private void SendCompleteNotification(AddProduct message) { if (!string.IsNullOrEmpty(message.OriginatorDestination) && message.RegistrationIndex == message.RegistrationsInBatch) { BatchStatusChanged notification = new BatchStatusChanged { BatchId = message.BatchId, BatchSourcePath = message.BatchSourcePath, Status = BatchStatus.Completed }; Bus.Send(message.OriginatorDestination, notification); } }