public void Visit(IVisitable pVisitable)
 {
     if (pVisitable is PriceChangeMessage)
     {
         PriceChangeMessage lMsg = pVisitable as PriceChangeMessage;
         Result = new TradeItem() { Change = lMsg.Change, Name = lMsg.Item, Price = lMsg.Price };
     }
 }
Ejemplo n.º 2
0
 public void AcceptTradeItemUpdate(TradeItem pItem)
 {
     TradeItem lItem = TradeItems.Where((pIt) => pIt.Name == pItem.Name).FirstOrDefault();
     if (lItem != null)
     {
         TradeItems.Remove(lItem);
     }
     TradeItems.Add(pItem);
 }