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)); }
public MessageDispatch CreateMessageDispatch(TransportMessage transportMessage) { return(new MessageDispatch(MessageContext.CreateNew(transportMessage), null, null)); }