Example #1
0
 public virtual void InvokeMarketDataUpdate(object sender, MarketDataUpdateEventArgs e)
 {
     var marketDataUpdateHandler = MarketDataUpdate;
     if (marketDataUpdateHandler != null) marketDataUpdateHandler(sender, e);
 }
Example #2
0
        /// <summary>
        /// Handles the MarketDataUpdate event of the eventController control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        private void eventController_MarketDataUpdate(object sender, MarketDataUpdateEventArgs e)
        {
            if (InvokeRequired)
            {
                if (e != null)
                {
                    eventController_MarketDataUpdateCallback d = eventController_MarketDataUpdate;
                    BeginInvoke(d, new[] { sender, e });
                }
            }

            if (e == null) return;
            if(ThreadProcessorId != e.SenderID) return;

            MarketData = e.MarketData;
        }