public CsvDocument Transform(CsvDocument document, IStructureTransformer transformer) { string[] columns = transformer.TransformHeader(document.HeaderCells); int expectedCellCount = columns.Length; string[][] rows = rowTransformationRunner.TransformRows( transformer, document.ContentRows, expectedCellCount); return(new CsvDocument { HeaderCells = columns, ContentRows = rows }); }
private string[][] TransformRows(string[][] rows, ICellContentTransformer transformer) { int expectedColumnCount = rows[0].Length; return(rowTransformationRunner.TransformRows(transformer, rows, expectedColumnCount)); }