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));
        }
Exemplo n.º 2
0
        private void AssertColumns(ISplitRowStrategy splitter, string str, int expectedColumnCount)
        {
            var columns = splitter.SplitRow <TestColumn>(str, ',', true);

            Assert.Equal(expectedColumnCount, columns.Count());
        }