# samfarah/consoletablesprinter architecture

> Architecture diagram of the GitHub repository samfarah/consoletablesprinter, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/samfarah/consoletablesprinter
- Repository: https://github.com/samfarah/consoletablesprinter

## Overview

ConsoleTablesPrinter is a small .NET library for turning objects and lists into styled console tables. The main workflow is: a caller invokes the extension API, the printer discovers visible properties and formats values, then renders a normal or Markdown table to console output. Table and cell styles, column attributes, and border options configure that rendering. The rendering excerpt omits some orchestration, so the graph leaves unverified internal calls out; it does not map tests or packaging.

Main entry points: [`ConsoleTablesPrinter/ConsoleTablePrinter.Rendering.cs`](https://github.com/samfarah/consoletablesprinter/blob/main/ConsoleTablesPrinter/ConsoleTablePrinter.Rendering.cs) (Table rendering), [`ConsoleTablesPrinter/ConsoleTablePrinter.cs`](https://github.com/samfarah/consoletablesprinter/blob/main/ConsoleTablesPrinter/ConsoleTablePrinter.cs) (Print extensions), [`ConsoleTablesPrinter/Models/TableStyle.cs`](https://github.com/samfarah/consoletablesprinter/blob/main/ConsoleTablesPrinter/Models/TableStyle.cs) (Table style), [`ConsoleTablesPrinter/Models/CellStyle.cs`](https://github.com/samfarah/consoletablesprinter/blob/main/ConsoleTablesPrinter/Models/CellStyle.cs) (Cell style)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["Public API"]
  node_printer_api["Print extensions"]
end

subgraph group_metadata["Data and styling"]
  node_table_style["Table style<br/>[TableStyle.cs]"]
  node_cell_style["Cell style<br/>[CellStyle.cs]"]
  node_column_attribute["Column attributes"]
  node_border_modes["Border and mode options"]
end

subgraph group_runtime["Rendering runtime"]
  node_rendering["Table rendering"]
  node_reflection["Property discovery"]
end

node_caller(("Library caller"))
node_console(("Console output"))

node_caller -->|"calls"| node_printer_api
node_printer_api -->|"dispatches"| node_rendering
node_rendering -->|"reads properties"| node_reflection
node_rendering -->|"reads metadata"| node_column_attribute
node_rendering -->|"reads options"| node_table_style
node_rendering -->|"applies styles"| node_cell_style
node_rendering -->|"selects mode"| node_border_modes
node_rendering -->|"writes table"| node_console

click node_printer_api "https://github.com/samfarah/consoletablesprinter/blob/main/ConsoleTablesPrinter/ConsoleTablePrinter.cs"
click node_table_style "https://github.com/samfarah/consoletablesprinter/blob/main/ConsoleTablesPrinter/Models/TableStyle.cs"
click node_cell_style "https://github.com/samfarah/consoletablesprinter/blob/main/ConsoleTablesPrinter/Models/CellStyle.cs"
click node_column_attribute "https://github.com/samfarah/consoletablesprinter/blob/main/ConsoleTablesPrinter/Attributes/TablePrintColAttribute.cs"
click node_border_modes "https://github.com/samfarah/consoletablesprinter/tree/main/ConsoleTablesPrinter/Models/Enums"
click node_rendering "https://github.com/samfarah/consoletablesprinter/blob/main/ConsoleTablesPrinter/ConsoleTablePrinter.Rendering.cs"
click node_reflection "https://github.com/samfarah/consoletablesprinter/blob/main/ConsoleTablesPrinter/ConsoleTablePrinter.Reflection.cs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_printer_api toneBlue
class node_table_style,node_cell_style,node_column_attribute,node_border_modes toneAmber
class node_rendering,node_reflection toneMint
class node_caller,node_console toneIndigo
```

## Components

### Public API

- [Print extensions](https://github.com/samfarah/consoletablesprinter/blob/main/ConsoleTablesPrinter/ConsoleTablePrinter.cs): `ConsoleTablesPrinter/ConsoleTablePrinter.cs`

### Data and styling

- [Table style](https://github.com/samfarah/consoletablesprinter/blob/main/ConsoleTablesPrinter/Models/TableStyle.cs): `ConsoleTablesPrinter/Models/TableStyle.cs`
- [Cell style](https://github.com/samfarah/consoletablesprinter/blob/main/ConsoleTablesPrinter/Models/CellStyle.cs): `ConsoleTablesPrinter/Models/CellStyle.cs`
- [Column attributes](https://github.com/samfarah/consoletablesprinter/blob/main/ConsoleTablesPrinter/Attributes/TablePrintColAttribute.cs): `ConsoleTablesPrinter/Attributes/TablePrintColAttribute.cs`
- [Border and mode options](https://github.com/samfarah/consoletablesprinter/tree/main/ConsoleTablesPrinter/Models/Enums): `ConsoleTablesPrinter/Models/Enums`

### Rendering runtime

- [Table rendering](https://github.com/samfarah/consoletablesprinter/blob/main/ConsoleTablesPrinter/ConsoleTablePrinter.Rendering.cs): `ConsoleTablesPrinter/ConsoleTablePrinter.Rendering.cs`
- [Property discovery](https://github.com/samfarah/consoletablesprinter/blob/main/ConsoleTablesPrinter/ConsoleTablePrinter.Reflection.cs): `ConsoleTablesPrinter/ConsoleTablePrinter.Reflection.cs`

### Other components

- **Library caller**
- **Console output**

## Connections

- Library caller → Print extensions: calls
- Print extensions → Table rendering: dispatches
- Table rendering → Property discovery: reads properties
- Table rendering → Column attributes: reads metadata
- Table rendering → Table style: reads options
- Table rendering → Cell style: applies styles
- Table rendering → Border and mode options: selects mode
- Table rendering → Console output: writes table
