public Dictionary <string, string> Deserialize(Message msmqMessage) { return(new Dictionary <string, string>() { { Headers.MessageId, msmqMessage.Id } }); }
Message CreateMsmqMessage(TransportMessage message) { var headers = message.Headers; var expressDelivery = headers.ContainsKey(Headers.Express); var hasTimeout = headers.TryGetValue(Headers.TimeToBeReceived, out var timeToBeReceivedStr); var msmqMessage = new Message { BodyStream = new MemoryStream(message.Body), UseJournalQueue = false, Recoverable = !expressDelivery, UseDeadLetterQueue = !(expressDelivery || hasTimeout), Label = GetMessageLabel(message), }; _msmqHeaderSerializer.SerializeToMessage(headers, msmqMessage); if (hasTimeout) { msmqMessage.TimeToBeReceived = TimeSpan.Parse(timeToBeReceivedStr); } return(msmqMessage); }
public void SerializeToMessage(Dictionary <string, string> headers, Message msmqMessage) { }