Пример #1
0
        private MessageDispatch CreateMessageDispatch(TransportMessage transportMessage, bool synchronousDispatch, bool sendAcknowledgment = true)
        {
            var message = ToMessage(transportMessage);

            if (message == null)
            {
                return(null);
            }

            var context      = MessageContext.CreateNew(transportMessage);
            var continuation = sendAcknowledgment ? GetOnRemoteMessageDispatchedContinuation(transportMessage) : ((dispatch, result) => { });

            return(new MessageDispatch(context, message, continuation, synchronousDispatch));
        }
Пример #2
0
 public MessageDispatch CreateMessageDispatch(TransportMessage transportMessage)
 {
     return(new MessageDispatch(MessageContext.CreateNew(transportMessage), null, null));
 }