示例#1
0
        public static Message MakeMessage(IBasicProperties prop, ReadOnlyMemory <byte> body)
        {
            var messageTypeName = prop.GetHeaderValue(MessageFieldConstants.MessageType);
            var message         = MessageSerialization.FromBytes(messageTypeName, body);

            return(message);
        }
示例#2
0
 public static DataContractKey GetDataContractKey(this IBasicProperties properties)
 {
     return(new DataContractKey(properties.GetHeaderValue(MessagingConstants.HeaderNames.Name),
                                properties.GetHeaderValue(MessagingConstants.HeaderNames.NameSpace)));
 }