private void OnNewSecurityTicksEvent(SecurityTicksNoSkip data)
 {
     _ticks = data;
 }
 protected SecurityTicksNoSkip UpdateSecurityTick(string symbol, SecurityTicksNoSkip existingVal)
 {
     return existingVal;
 }
        protected SecurityTicksNoSkip AddSecurityTick(string symbol)
        {
            var tick = new SecurityTicksNoSkip(symbol);
            _onAddComplete += tick.CompleteAdding;
            OnDataReceived += tick.OnDataReceived;

            return tick;
        }
 protected override void SymbolReaderTaskWork()
 {
     // Tested independantly. See MarketDataReaderTest.
     var tick = new SecurityTicksNoSkip("AAA");
     dataQueue.Add(tick);
     dataQueue.CompleteAdding();
 }
        public bool SymbolProcessorTaskWorkCancellationTest()
        {
            var tick = new SecurityTicksNoSkip("AAA");
            dataQueue.Add(tick);
            if (null == _cts)
                _cts = new System.Threading.CancellationTokenSource();
            _cts.Cancel();
            base.OnNewDataReceived = Handler;
            tick.CompleteAdding();
            dataQueue.CompleteAdding();
            SymbolProcessorTaskWork();

            return (!_dataReceived && IsCancellationRequested);
        }
 internal void DataReceived(SecurityTicksNoSkip data)
 {
     dataQueue.Add(data);
 }