public IteratorBasedDataProvider(CsvIterator iterator, ISplitRowStrategy rowSplitter, char separator)
     : base(
         iterator: iterator,
         rowSplitter,
         separator: separator
         )
 {
 }
        public override TModel Convert(ISplitRowStrategy rowSplitter, string value, char separator = ',', bool removeQuotes = true)
        {
            if (!IsInitialized)
            {
                throw new CsvParserException("you should initialize csv converter before usage");
            }

            var columns = rowSplitter.SplitRow <CsvColumn>(value, separator, removeQuotes);

            return(ProcessRow(columns, Culture));
        }
Ejemplo n.º 3
0
        private void AssertColumns(ISplitRowStrategy splitter, string str, int expectedColumnCount)
        {
            var columns = splitter.SplitRow <TestColumn>(str, ',', true);

            Assert.Equal(expectedColumnCount, columns.Count());
        }
Ejemplo n.º 4
0
 public abstract TModel Convert(ISplitRowStrategy rowSplitter, string value, char separator = ',', bool removeQuotes = true);
Ejemplo n.º 5
0
 public CsvDataProvider(CsvIterator iterator, ISplitRowStrategy rowSplitter, char separator)
 {
     _iterator    = iterator;
     _rowSplitter = rowSplitter;
     _separator   = separator;
 }