Example #1
0
        private void Initialize(CsvReaderParameters parameters)
        {
            if (parameters == null)
            {
                parameters = new CsvReaderParameters();
            }

            Parameters = parameters;

            if (Parameters.HasHeaderRow)
            {
                if (ReadLine())
                {
                    ReadFieldNameIndexes();
                }

                // Restore initial state
                CurrentLineParts = null;
                CurrentLine      = null;
            }
        }
Example #2
0
        public CsvReader(Stream content, CsvReaderParameters parameters)
        {
            Reader = new StreamReader(content);

            Initialize(parameters);
        }