Пример #1
0
 public void Send(TradeRequest tradeRequest)
 {
     EmsTemplate.ConvertAndSendWithDelegate(tradeRequest, delegate(Message message)
     {
         message.ReplyTo       = defaultReplyToQueue;
         message.CorrelationID = new Guid().ToString();
         return(message);
     });
 }
Пример #2
0
        public void PublishUsingDict(string ticker, double price)
        {
            IDictionary marketData = new Hashtable();

            marketData.Add("TICKER", ticker);
            marketData.Add("PRICE", price);
            EmsTemplate.ConvertAndSendWithDelegate("APP.STOCK.MARKETDATA", marketData,
                                                   delegate(Message message)
            {
                message.Priority      = 5;
                message.CorrelationID = new Guid().ToString();
                return(message);
            });
        }