Пример #1
0
 public void PublishQuote(QuickReturns.StockTrading.ExchangeService.DataContracts.Quote quote)
 {
     lock (tickers)
     {
         Quote storedQuote = tickers[quote.Ticker] as Quote;
         if (storedQuote == null)
         {
             tickers.Add(quote.Ticker, quote);
         }
     }
 }
Пример #2
0
 public void PublishQuote(Quote quote)
 {
     lock (tickers)
     {
         Quote storedQuote = tickers[quote.Ticker] as Quote;
         if (storedQuote == null)
         {
             tickers.Add(quote.Ticker, quote);
         }
         else
         {
             tickers[quote.Ticker] = quote;
         }
     }
 }