/// <summary> /// returns true if more data to process, false otherwise /// </summary> public bool NextTick() { try { string msg = _instream.ReadLine(); if (msg == null) // end of file { _instream.Close(); return(false); } else { Tick k = Tick.Deserialize(msg); Count++; OnGotTick(k); return(true); } } catch (EndOfStreamException) { _instream.Close(); return(false); } catch (ObjectDisposedException) { return(false); } }