public void Add(string symbol, long timestamp, double price, double volume) { lock (this) { //add to quote capture if (!QuoteCaptures.ContainsKey(symbol)) { var qc = new QuoteCapture(symbol); qc.DataAdded += Qc_DataAdded; QuoteCaptures.TryAdd(symbol, qc); } if (timestamp > QuoteCaptures[symbol].LastTime) { QuoteCaptures[symbol].Add(timestamp, price, volume); } } }
public IQuoteCapture GetInMemoryQuoteCapture(string symbol) { return(QuoteCaptures.ContainsKey(symbol) ? QuoteCaptures[symbol] : null); }