public Ticker GetTicker(int pairId) { if (!_tickerSources.ContainsKey(pairId)) { _tickerSources[pairId] = new Ticker.Source(); _dataFeed.GetTicker(pairId).Tick += args => { lock (_syncRoot) { _tickerSources[pairId].CreateTick(args); } }; } return _tickerSources[pairId].Ticker; }
public Ticker GetTicker(int pairId) { if (!_tickerSources.ContainsKey(pairId)) { _tickerSources[pairId] = new Ticker.Source(); _dataFeed.GetTicker(pairId).Tick += args => { try { _tickerSources[pairId].CreateTick(args); } catch (Exception ex) { _handler(ex); } }; } return _tickerSources[pairId].Ticker; }