protected virtual BaseMessage CreateNmsMessage(Message message) { BaseMessage result = null; if ("amqp/map" == message.ContentType) { Dictionary<string, object> dict = new Dictionary<string,object>(); message.GetContent(dict); PrimitiveMap bodyMap = new PrimitiveMap(); SetNmsPrimitiveMap(bodyMap, dict); MapMessage mapMessage = new MapMessage(); mapMessage.Body = bodyMap; result = mapMessage; } else if ("amqp/list" == message.ContentType) { Collection<object> coll = new Collection<object>(); message.GetContent(coll); ObjectMessage objMessage = new ObjectMessage(); objMessage.Body = ConvertAmqpListToObject(coll); result = objMessage; } else { TextMessage textMessage = new TextMessage(); textMessage.Text = message.GetContent(); result = textMessage; } return result; }
public ITextMessage CreateTextMessage(string text) { TextMessage answer = new TextMessage(text); return(answer); }
public ITextMessage CreateTextMessage(string text) { TextMessage answer = new TextMessage(text); return answer; }
public ITextMessage CreateTextMessage() { TextMessage answer = new TextMessage(); return(answer); }
public ITextMessage CreateTextMessage() { TextMessage answer = new TextMessage(); return answer; }