Immutable capture of a log Entry and its Offset.
 public OneLogReader(RawLogFileMonitorOccurence file, DateTimeStamp firstLogTime)
 {
     File            = file;
     _reader         = file.CreateFilteredReaderAndMoveTo(firstLogTime);
     FirstGroupDepth = _reader.CurrentMulticast.GroupDepth;
     Head            = _reader.CurrentMulticastWithOffset;
 }
 public OneLogReader(RawLogFileMonitorOccurence file, long offset)
 {
     _reader = file.CreateFilteredReader(offset);
     _reader.MoveNext();
     FirstGroupDepth = _reader.CurrentMulticast.GroupDepth;
     Head            = _reader.CurrentMulticastWithOffset;
 }
Exemplo n.º 3
0
 OneLogReader(RawLogFileMonitorOccurence file, LogReader positioned)
 {
     File    = file;
     _reader = positioned;
     Debug.Assert(_reader.CurrentMulticast != null);
     FirstGroupDepth = _reader.CurrentMulticast.GroupDepth;
     Head            = _reader.CurrentMulticastWithOffset;
 }
 public bool Forward()
 {
     Debug.Assert(_reader != null);
     if (_reader.MoveNext())
     {
         Head = _reader.CurrentMulticastWithOffset;
         return(true);
     }
     _reader.Dispose();
     _reader = null;
     return(false);
 }