Exemple #1
0
        public bool Read()
        {
            string line = reader.ReadLine();

            if (line == null)
            {
                _current = null;
                return false;
            }

            _current = parseRecord(line);
            return true;
        }
Exemple #2
0
        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;
        }