public void Execute(Envelope envelope, IEnvelopeContext context)
        {
            try
            {
                context.SendOutgoingMessages(envelope, _context.OutgoingMessages());

                envelope.Callback.MarkSuccessful();

                var message = new MessageSuccessful { Envelope = envelope.ToToken() };
                if (!message.Envelope.IsDelayedEnvelopePollingJobRelated())
                    context.InfoMessage(message);
            }
            catch (Exception ex)
            {
                context.SendFailureAcknowledgement(envelope, "Sending cascading message failed: " + ex.Message);
                context.Error(envelope.CorrelationId, ex.Message, ex);
                envelope.Callback.MoveToErrors(new ErrorReport(envelope, ex));
            }
        }
 protected bool Equals(MessageSuccessful other)
 {
     return Equals(Envelope, other.Envelope);
 }
 protected bool Equals(MessageSuccessful other)
 {
     return(Equals(Envelope, other.Envelope));
 }