private void DoLoop() { for (; m_continue;) { if (null == m_func) { Thread.Sleep(256); continue; } byte *ptr = m_func(m_handle, 256); if (null == ptr) { continue; } var func = Tick; if (null == func) { continue; } Quote quote = new Quote(ptr); if ((quote.Bids.Length > 0) || (quote.Asks.Length > 0)) { TickEventArgs e = new TickEventArgs(quote); func(this, e); } } m_func(m_handle, 0); }
private void OnTick(object sender, TickEventArgs e) { m_realTimeQuotes.Add(e.Tick); }
private void DoLoop() { for (; m_continue;) { if (null == m_func) { Thread.Sleep(256); continue; } byte* ptr = m_func(m_handle, 256); if (null == ptr) { continue; } var func = Tick; if (null == func) { continue; } Quote quote = new Quote(ptr); if ((quote.Bids.Length > 0) || (quote.Asks.Length > 0)) { TickEventArgs e = new TickEventArgs(quote); func(this, e); } } m_func(m_handle, 0); }