public static Message MakeMessage(IBasicProperties prop, ReadOnlyMemory <byte> body) { var messageTypeName = prop.GetHeaderValue(MessageFieldConstants.MessageType); var message = MessageSerialization.FromBytes(messageTypeName, body); return(message); }
public static DataContractKey GetDataContractKey(this IBasicProperties properties) { return(new DataContractKey(properties.GetHeaderValue(MessagingConstants.HeaderNames.Name), properties.GetHeaderValue(MessagingConstants.HeaderNames.NameSpace))); }