Esempio n. 1
0
        /// <summary>
        /// Creates a new parser using the given <see cref="StreamReader" />
        /// and <see cref="CsvParserOptions" />.
        /// </summary>
        /// <param name="reader">The <see cref="StreamReader" /> with teh CSV file data.</param>
        /// <param name="options">The <see cref="CsvParserOptions" /> used for parsing the CSV file.</param>
        public CsvParser( TextReader reader, CsvParserOptions options )
        {
            this.reader = reader;
            BufferSize = options.BufferSize;
            Delimiter = options.Delimiter;
            FieldCount = options.FieldCount;
            AllowComments = options.AllowComments;

            readerBuffer = new char[options.BufferSize];
        }
Esempio n. 2
0
        /// <summary>
        /// Creates a new parser using the given <see cref="StreamReader" />
        /// and <see cref="CsvParserOptions" />.
        /// </summary>
        /// <param name="reader">The <see cref="StreamReader" /> with teh CSV file data.</param>
        /// <param name="options">The <see cref="CsvParserOptions" /> used for parsing the CSV file.</param>
        public CsvParser(TextReader reader, CsvParserOptions options)
        {
            this.reader   = reader;
            BufferSize    = options.BufferSize;
            Delimiter     = options.Delimiter;
            Quote         = options.Quote;
            FieldCount    = options.FieldCount;
            AllowComments = options.AllowComments;

            readerBuffer = new char[options.BufferSize];
        }