Example #1
0
        public void Enqueue(EventItem item, long utcTime)
        {
            var eventType = (EventType)item.EventType;

            if (eventType == EventType.Tick)
            {
                var binary = (TickBinaryBox)item.EventDetail;
                tickQueue.Enqueue(ref binary.TickBinary);
                binary.Free();
            }
            else if (eventType == EventType.EndHistorical)
            {
                var queueItem = new QueueItem();
                queueItem.Symbol      = item.Symbol.BinaryIdentifier;
                queueItem.EventType   = eventType;
                queueItem.EventDetail = item.EventDetail;
                tickQueue.Enqueue(queueItem, utcTime);
            }
            else
            {
                if (debug)
                {
                    log.Debug("Ignoring event from Reader: " + eventType);
                }
            }
        }