Esempio n. 1
0
        public void TestInitialize()
        {
            _description = new CsvFileDescription
            {
                SeparatorChar = ',',
                FirstLineHasColumnNames = true,
                IgnoreUnknownColumns = true,
            };
            _input =
@"Id,Name,Last Name,Age,City
1,John,Doe,15,Washington";

            byte[] stringAsByteArray = Encoding.UTF8.GetBytes(_input);
            Stream stream = new MemoryStream(stringAsByteArray);
            _sr = new StreamReader(stream, Encoding.UTF8);
            _dataAccess = new FileDataAccess(_sr, _description);
            
            _cs = new CsvStream(_sr, null, _description.SeparatorChar,
                _description.IgnoreTrailingSeparatorChar);
            _row = new DataRow();
            _fm = new FieldMapperReading<Person>(_description, null, false);
            _ae = new AggregatedException(typeof(Person).ToString(), null, _description.MaximumNbrExceptions);
            _reader = new RowReader<Person>(_description, _ae);
        }
 public CsvStreamBuffer(CsvStream stream)
 {
     this.stream = stream;
 }
Esempio n. 3
0
 public CsvStreamLine(CsvStream stream, CsvStreamBuffer buffer)
 {
     this.stream = stream;
     this.buffer = buffer;
 }
Esempio n. 4
0
 public CsvStreamBuffer(CsvStream stream)
 {
     this.stream = stream;
 }
Esempio n. 5
0
 public CsvStreamLine(CsvStream stream, CsvStreamBuffer buffer)
 {
     this.stream = stream;
     this.buffer = buffer;
 }
Esempio n. 6
0
 public CsvStreamLine(CsvStream stream, CsvStreamBuffer buffer)
 {
     _stream = stream;
     _buffer = buffer;
 }