public bool Read() { string line = reader.ReadLine(); if (line == null) { _current = null; return false; } _current = parseRecord(line); return true; }
private Document parseRecord(string line) { var document = new Document(); var values = SplitLine(line); for (int i = 0; i < Schema.FieldDefinitions.Count; i++) { var definition = Schema.FieldDefinitions[i]; if (i < values.Count) document.values.Add(definition.Name, getValue(values[i], definition)); else document.values.Add(definition.Name, null); } return document; }