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
The `DefaultObjectHandler`, by default, pads all rows with missing values with `null` values.
365
365
366
-
## Styles
366
+
## Table Renderers
367
367
368
-
The TextTableBuilder has support for (very simple) styles. These can be specified as an optional argument to the `Build()` method. Currently only a very few styles are supported.
368
+
The TextTableBuilder uses an `ITableRenderer` to do the actual 'rendering' of the table. The TableRenderer is provided with `RenderColums`, which provide column information, and an `IEnumerable<string[]>` which represents the rows and values. The values have been formatted at this point; the table renderer takes care of aligning, padding etc.
369
+
370
+
By default, the TextTableBuilder uses the `DefaultTableRenderer` which produced the above examples. Two other, very simple, renderers are provided. These are the `MinimalTableRenderer` and `MSDOSTableRenderer`.
371
+
372
+
To use a specific `ITableRenderer` you pass one to the `Build()` method:
369
373
370
-
To specify a style, invoke the `Build()` method with a `style` argument:
Going back to our [very first example](#quickstart), the following styles are currently implemented. More _may_ be added in the future (as well as ANSI color support etc.):
379
+
Going back to our [very first example](#quickstart), the following styles are currently provided. More _may_ be added in the future (as well as ANSI color support etc.) but it's also trivial to build your own; just implement `ITableRenderer`:
377
380
378
-
### TableStyle.Default
381
+
### DefaultTableRenderer
379
382
380
383
```cmd
381
384
No | Name | Position | Salary
@@ -386,7 +389,7 @@ No | Name | Position | Salary
386
389
4 | Mark Zuckerberg | Founder Facebook | 1,300,000
0 commit comments