private CsvDataReader(CsvStreamReader reader, bool ownReader, IFormatProvider formatProvider = null) { _formatProvider = formatProvider ?? System.Globalization.CultureInfo.CurrentCulture; _csvStreamReader = reader; _ownReader = ownReader; _headers = reader.Headers.ToArray(); }
protected virtual void Dispose(bool disposing) { if (disposing && _csvStreamReader != null && _ownReader) { _csvStreamReader.Dispose(); _csvStreamReader = null; } }
public CsvDataReader(CsvStreamReader reader, IFormatProvider formatProvider = null) : this(reader, false, formatProvider) { }