void ReadDataCsv(string content, TableContent d) { CsvManager.TextTrim = true; var td = CsvManager.ReadCsvString(content); d.Schema.AddRange(td.Header); foreach (var r in td.Content) { var tr = new TableRow(); tr.AddRange(r); d.Rows.Add(tr); } }
public static Table BuildTable(TableBuilder tableBuilder) { var table = new Table(); if (tableBuilder.Header != null) { var th = new TableHeader(); th.AddRange(tableBuilder.Header); table.Rows.Add(th); } if (tableBuilder.Data != null) { foreach (var row in tableBuilder.Data) { var tr = new TableRow(); tr.AddRange(row); table.Rows.Add(tr); } } return(table); }