Class TableColor
Table writer with color support
Inheritance
Namespace: Terminaux.Writer.FancyWriters
Assembly: Terminaux.dll
Syntax
public static class TableColor
Methods
| Edit this page View SourceRenderTable(string[], string[,], int, Color, Color, Color, Color, bool, List<CellOptions>?)
Renders a table with text
Declaration
public static string RenderTable(string[] Headers, string[,] Rows, int Margin, Color SeparatorForegroundColor, Color HeaderForegroundColor, Color ValueForegroundColor, Color BackgroundColor, bool SeparateRows = true, List<CellOptions>? CellOptions = null)
Parameters
Type | Name | Description |
---|---|---|
string[] | Headers | Headers to insert to the table. |
string[,] | Rows | Rows to insert to the table. |
int | Margin | Margin offset |
Color | SeparatorForegroundColor | A separator foreground color that will be changed to. |
Color | HeaderForegroundColor | A header foreground color that will be changed to. |
Color | ValueForegroundColor | A value foreground color that will be changed to. |
Color | BackgroundColor | A background color that will be changed to. |
bool | SeparateRows | Separate the rows? |
List<CellOptions> | CellOptions | Specifies the cell options |
Returns
Type | Description |
---|---|
string |
RenderTablePlain(string[], string[,], int, bool, List<CellOptions>?)
Renders a table with text
Declaration
public static string RenderTablePlain(string[] Headers, string[,] Rows, int Margin, bool SeparateRows = true, List<CellOptions>? CellOptions = null)
Parameters
Type | Name | Description |
---|---|---|
string[] | Headers | Headers to insert to the table. |
string[,] | Rows | Rows to insert to the table. |
int | Margin | Margin offset |
bool | SeparateRows | Separate the rows? |
List<CellOptions> | CellOptions | Specifies the cell options |
Returns
Type | Description |
---|---|
string |
WriteTable(string[], string[,], int, bool, List<CellOptions>?)
Draw a table with text
Declaration
public static void WriteTable(string[] Headers, string[,] Rows, int Margin, bool SeparateRows = true, List<CellOptions>? CellOptions = null)
Parameters
Type | Name | Description |
---|---|---|
string[] | Headers | Headers to insert to the table. |
string[,] | Rows | Rows to insert to the table. |
int | Margin | Safe threshold from left |
bool | SeparateRows | Separate the rows? |
List<CellOptions> | CellOptions | Specifies the cell options |
WriteTable(string[], string[,], int, Color, Color, Color, Color, bool, List<CellOptions>?)
Draw a table with text
Declaration
public static void WriteTable(string[] Headers, string[,] Rows, int Margin, Color SeparatorForegroundColor, Color HeaderForegroundColor, Color ValueForegroundColor, Color BackgroundColor, bool SeparateRows = true, List<CellOptions>? CellOptions = null)
Parameters
Type | Name | Description |
---|---|---|
string[] | Headers | Headers to insert to the table. |
string[,] | Rows | Rows to insert to the table. |
int | Margin | Margin offset |
Color | SeparatorForegroundColor | A separator foreground color that will be changed to. |
Color | HeaderForegroundColor | A header foreground color that will be changed to. |
Color | ValueForegroundColor | A value foreground color that will be changed to. |
Color | BackgroundColor | A background color that will be changed to. |
bool | SeparateRows | Separate the rows? |
List<CellOptions> | CellOptions | Specifies the cell options |
WriteTablePlain(string[], string[,], int, bool, List<CellOptions>?)
Draw a table with text
Declaration
public static void WriteTablePlain(string[] Headers, string[,] Rows, int Margin, bool SeparateRows = true, List<CellOptions>? CellOptions = null)
Parameters
Type | Name | Description |
---|---|---|
string[] | Headers | Headers to insert to the table. |
string[,] | Rows | Rows to insert to the table. |
int | Margin | Safe threshold from left |
bool | SeparateRows | Separate the rows? |
List<CellOptions> | CellOptions | Specifies the cell options |