Esempio n. 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CsvDataReader"/> class.
        /// </summary>
        /// <param name="path">The path.</param>
        /// <param name="delimiter">The delimiter.</param>
        /// <param name="encoding">The encoding.</param>
        public CsvDataReader(string path, char delimiter, Encoding encoding)
        {
            sr             = new StreamReader(path, encoding);
            this.delimiter = delimiter;

            Read();
            names = DataReaderUtils.ReadNames(this);
        }
Esempio n. 2
0
        private void InitNames()
        {
            if (!Read())
            {
                throw new NdbException("Can't read column names");
            }

            names = DataReaderUtils.ReadNames(this);
        }
Esempio n. 3
0
 /// <summary>
 ///                     Return the index of the named field.
 /// </summary>
 /// <returns>
 ///                     The index of the named field.
 /// </returns>
 /// <param name="name">
 ///                     The name of the field to find.
 ///                 </param><filterpriority>2</filterpriority>
 public int GetOrdinal(string name)
 {
     return(DataReaderUtils.GetOrdinal(names, name));
 }