Beispiel #1
0
        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);
        }
Beispiel #2
0
 public IMhMessage Peek(string id)
 {
     queue.MessageReadPropertyFilter.SetAll();
     return(MhMessage.Convert(queue.PeekById(id)));
 }
Beispiel #3
0
 public IMhMessage Peek()
 {
     queue.MessageReadPropertyFilter.SetAll();
     return(MhMessage.Convert(queue.Peek()));
 }
Beispiel #4
0
 public IMhMessage Receive(TimeSpan timeout)
 {
     queue.MessageReadPropertyFilter.SetAll();
     return(MhMessage.Convert(queue.Receive(timeout)));
 }