Closed nikitaignatov closed 8 years ago
I needed a slightly different format, so added ability to choose default, markdown and alternative. The markdown can be used with github readme files like this:
Usage of the new format:
Console.WriteLine("\nFORMAT: Default:\n"); ConsoleTable.From<Something>(rows).Write(); Console.WriteLine("\nFORMAT: MarkDown:\n"); ConsoleTable.From<Something>(rows).Write(Format.MarkDown); Console.WriteLine("\nFORMAT: Alternative:\n"); ConsoleTable.From<Something>(rows).Write(Format.Alternative);
Examples of the output:
FORMAT: Default: ----------------------------------------------------------------------------- | Id | Name | Date | ----------------------------------------------------------------------------- | 72c0f4cc73eb4fd3b2b4a6896d020e66 | Khalid Abuhkameh | 17-04-2016 23:21:38 | ----------------------------------------------------------------------------- | 72c0f4cc73eb4fd3b2b4a6896d020e66 | Khalid Abuhkameh | 17-04-2016 23:21:38 | ----------------------------------------------------------------------------- | 72c0f4cc73eb4fd3b2b4a6896d020e66 | Khalid Abuhkameh | 17-04-2016 23:21:38 | ----------------------------------------------------------------------------- | 72c0f4cc73eb4fd3b2b4a6896d020e66 | Khalid Abuhkameh | 17-04-2016 23:21:38 | ----------------------------------------------------------------------------- | 72c0f4cc73eb4fd3b2b4a6896d020e66 | Khalid Abuhkameh | 17-04-2016 23:21:38 | ----------------------------------------------------------------------------- Count: 10 FORMAT: MarkDown: | Id | Name | Date | |----------------------------------|------------------|---------------------| | 72c0f4cc73eb4fd3b2b4a6896d020e66 | Khalid Abuhkameh | 17-04-2016 23:21:38 | | 72c0f4cc73eb4fd3b2b4a6896d020e66 | Khalid Abuhkameh | 17-04-2016 23:21:38 | | 72c0f4cc73eb4fd3b2b4a6896d020e66 | Khalid Abuhkameh | 17-04-2016 23:21:38 | | 72c0f4cc73eb4fd3b2b4a6896d020e66 | Khalid Abuhkameh | 17-04-2016 23:21:38 | | 72c0f4cc73eb4fd3b2b4a6896d020e66 | Khalid Abuhkameh | 17-04-2016 23:21:38 | FORMAT: Alternative: +----------------------------------+------------------+---------------------+ | Id | Name | Date | +----------------------------------+------------------+---------------------+ | 72c0f4cc73eb4fd3b2b4a6896d020e66 | Khalid Abuhkameh | 17-04-2016 23:21:38 | +----------------------------------+------------------+---------------------+ | 72c0f4cc73eb4fd3b2b4a6896d020e66 | Khalid Abuhkameh | 17-04-2016 23:21:38 | +----------------------------------+------------------+---------------------+ | 72c0f4cc73eb4fd3b2b4a6896d020e66 | Khalid Abuhkameh | 17-04-2016 23:21:38 | +----------------------------------+------------------+---------------------+ | 72c0f4cc73eb4fd3b2b4a6896d020e66 | Khalid Abuhkameh | 17-04-2016 23:21:38 | +----------------------------------+------------------+---------------------+ | 72c0f4cc73eb4fd3b2b4a6896d020e66 | Khalid Abuhkameh | 17-04-2016 23:21:38 | +----------------------------------+------------------+---------------------+
I needed a slightly different format, so added ability to choose default, markdown and alternative. The markdown can be used with github readme files like this:
Usage of the new format:
Examples of the output: