Example #1
0
        public bool QueueEvent(HFTGlobalEventType type, object data)
        {
            // At the time we queue this event, is there a handler?
            // Let's us check the event might be handled so we can take other action if it's
            // not.
            if (OnGlobalEvent == null)
            {
                return(false);
            }

            m_eventProcessor.QueueEvent(() => {
                HFTGlobalEventHandler handler = OnGlobalEvent;
                if (handler != null)
                {
                    handler(type, data);
                }
            });

            return(true);
        }
        public bool QueueEvent(HFTGlobalEventType type, object data)
        {
            // At the time we queue this event, is there a handler?
            // Let's us check the event might be handled so we can take other action if it's
            // not.
            if (OnGlobalEvent == null)
            {
                return false;
            }

            m_eventProcessor.QueueEvent(() => {
                HFTGlobalEventHandler handler = OnGlobalEvent;
                if (handler != null)
                {
                    handler(type, data);
                }
            });

            return true;
        }