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); }
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()); }
public void RemoveColumn(String headerName) { CsvColumn csc = ColumnValues.Where(cv => cv.Header.IndexOf(headerName) != -1).FirstOrDefault(); ColumnValues?.Remove(csc); }