Beispiel #1
0
            public IFilterValue GetColumn(String headerName)
            {
                IFilterValue fv = ColumnValues.Where(cv => cv.Header.IndexOf(headerName) != -1).FirstOrDefault();

                if (fv == null && ColumnValues.Where(cv => cv.Header == headerName).Count() == 1)
                {
                    InvalidRow = true;
                }
                return(fv);
            }
Beispiel #2
0
            public IFilterValue DoMatchHeader(String columnName)
            {
                String columnHeader = $"{columnName}";
                var    doubleQuoted = ColumnValues.Where(row => row.Header.IndexOf("\"\"") != -1);

                if (doubleQuoted.Count() > 0)
                {
                    columnHeader = $"\"{columnHeader}\"";
                }
                return(ColumnValues.Where(cv => cv.Header == columnHeader).FirstOrDefault());
            }
Beispiel #3
0
            public void RemoveColumn(String headerName)
            {
                CsvColumn csc = ColumnValues.Where(cv => cv.Header.IndexOf(headerName) != -1).FirstOrDefault();

                ColumnValues?.Remove(csc);
            }