public static IMhMessage Convert(Message msg) { msg.Formatter = new JsonMessageFormatter(); var mhMessage = new MhMessage { Label = msg.Label, Body = msg.Body, ArrivedTime = msg.ArrivedTime, SentTime = msg.SentTime, Id = msg.Id }; return(mhMessage); }
public IMhMessage Peek(string id) { queue.MessageReadPropertyFilter.SetAll(); return(MhMessage.Convert(queue.PeekById(id))); }
public IMhMessage Peek() { queue.MessageReadPropertyFilter.SetAll(); return(MhMessage.Convert(queue.Peek())); }
public IMhMessage Receive(TimeSpan timeout) { queue.MessageReadPropertyFilter.SetAll(); return(MhMessage.Convert(queue.Receive(timeout))); }