public static Dictionary<string, string> ExtractHeaders(Message msmqMessage)
{
var headers = DeserializeMessageHeaders(msmqMessage);
//note: we can drop this line when we no longer support interop btw v3 + v4
if (msmqMessage.ResponseQueue != null)
{
headers[Headers.ReplyToAddress] = GetIndependentAddressForQueue(msmqMessage.ResponseQueue).ToString();
}
if (Enum.IsDefined(typeof(MessageIntentEnum), msmqMessage.AppSpecific))
{
headers[Headers.MessageIntent] = ((MessageIntentEnum)msmqMessage.AppSpecific).ToString();
}
headers[Headers.CorrelationId] = GetCorrelationId(msmqMessage, headers);
return headers;
}