Parse() public méthode

public Parse ( Stream s ) : IEnumerable
s Stream
Résultat IEnumerable
 public IEnumerable<LogEntry> Read(LogEntryParser parser)
 {
     using (var file = FileUtil.OpenReadOnly(FileName, position))
     {
         foreach (var item in parser.Parse(file))
         {
             yield return item;
         }
         position = file.Position;
     }
 }
Exemple #2
0
 private void constructPaginator()
 {
     LogEntryParser log = new LogEntryParser();
     FileStream stream = new FileStream(debugFileDB, FileMode.Open);
     IEnumerable<LogViewer.LogEntry> loge = log.Parse(stream);
     stream.Close();
     debugData = new List<LogViewer.LogEntry>(loge);
     debugData.Reverse();
     this.totalRows = debugData.Count;
     this.totalPages = (this.totalRows + this.pageSize - 1) / this.pageSize;
 }