You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Iterate all rows, creating strings from all values and keep track of column widths
42
41
varcols=table.Columns.ToArray();
42
+
43
+
if(cols.Length==0)
44
+
{
45
+
thrownewInvalidOperationException("At least one column must be specified");
46
+
}
47
+
48
+
// Determine preliminary columnwidths
43
49
varcolwidths=cols.Select((c,i)=>Math.Max(cols[i].MinWidth??0,Math.Min(c.Width??int.MaxValue,c.Name.Length))).ToArray();// Initialize column widths to header widths or minimum widths or fixed widths; whichever is larger
50
+
51
+
// Iterate all rows, creating strings from all values and keep track of column widths
44
52
varrows=newList<string[]>(table.Rows.Count);
45
53
foreach(varrowintable.Rows)
46
54
{
@@ -51,7 +59,9 @@ public string Build(Table table, ITableRenderer tableRenderer, IFormatProvider f
51
59
ObjectRow or =>(ObjectHandlers.GetHandler(or.Value.GetType())??ObjectHandlers.GetHandler(typeof(object))).Handle(or.Value,cols.Length),
0 commit comments