Пример #1
0
 public bool AddTradeBuffer(string instrumentName, int bufferSize = 1024)
 {
     if (!_tradeFeedBuffers.ContainsKey(instrumentName))
     {
         _tradeFeedBuffers[instrumentName] = new TradeFeedBuffer(instrumentName);
         return(true);
     }
     else
     {
         return(false);
     }
 }
Пример #2
0
 public bool AddTradeConsumer(string instrumentName, IMarketDataConsumer <TradeInfo> consumer)
 {
     if (_tradeFeedBuffers.ContainsKey(instrumentName))
     {
         _tradeFeedBuffers[instrumentName].ConsumerSubscribe(consumer);
         return(true);
     }
     else
     {
         _tradeFeedBuffers[instrumentName] = new TradeFeedBuffer(instrumentName);
         _tradeFeedBuffers[instrumentName].ConsumerSubscribe(consumer);
         return(false);
     }
 }