public bool AddTradeBuffer(string instrumentName, int bufferSize = 1024) { if (!_tradeFeedBuffers.ContainsKey(instrumentName)) { _tradeFeedBuffers[instrumentName] = new TradeFeedBuffer(instrumentName); return(true); } else { return(false); } }
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); } }