示例#1
0
        public static DelimitedParser Create(
            DelimitedParserSettings settings,
            Stream stream)
        {
            var reader = new CharReader(stream);

            return(new DelimitedParser(settings, reader));
        }
示例#2
0
        private DelimitedParser(
            DelimitedParserSettings settings,
            CharReader reader)
        {
            this.header    = settings.DelimitedHeader;
            this.reader    = reader;
            this.delimiter = settings.Delimiter;

            this.row = new string[header.Count];
        }
示例#3
0
        private DelimitedParserSettings GetDelimitedParserSettings(char delimiter)
        {
            var factory = new CsvSerializerHeaderFactory(this.type);

            var settings = new DelimitedParserSettings
            {
                DelimitedHeader = new DelimitedHeader(factory.GetDelimitedColumns()),
                Delimiter       = delimiter,
            };

            return(settings);
        }