IMapMessageCloak IMapMessageCloak.Copy() { IMapMessageCloak copy = new AMQPMapMessageCloak(Connection); CopyInto(copy); return(copy); }
public virtual IMessageCloak Copy() { IMessageCloak copy = null; switch (JMSMessageType) { case MessageSupport.JMS_TYPE_MSG: copy = new AMQPMessageCloak(connection); break; case MessageSupport.JMS_TYPE_BYTE: copy = new AMQPBytesMessageCloak(connection); break; case MessageSupport.JMS_TYPE_TXT: copy = new AMQPTextMessageCloak(connection); break; case MessageSupport.JMS_TYPE_MAP: copy = new AMQPMapMessageCloak(connection); break; case MessageSupport.JMS_TYPE_STRM: copy = new AMQPStreamMessageCloak(connection); break; case MessageSupport.JMS_TYPE_OBJ: copy = new AMQPObjectMessageCloak(connection, (this as AMQPObjectMessageCloak).Type); break; default: throw new NMSException("Fatal error Invalid JMS type."); } CopyInto(copy); return(copy); }
private static IMessage CreateMapMessage(MessageConsumer consumer, Amqp.Message message) { IMapMessageCloak cloak = new AMQPMapMessageCloak(consumer, message); return(new MapMessage(cloak)); }