API Reference
Table`1
A Table whose rows are read from typed items (Table.For): each column has a value selector, and every table option and fluent method applies as usual. Without columns, every public property of T is a column, read without reflection over anything else. The items are read when the table is first laid out and after Table.Refresh. Table.For(servers) .WithTitle("Servers") .Column(s => s.Name, c => c.WithIsKey()) .Column(s => s.Ram, c => c.WithPresenter(CellPresenters.Bytes)) .WithTotals();
Inheritance
- Table
- Table`1
Usage
Explore 22 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 19
- Method Ui.Table
- Method Ui.Table``1
- Method ConsoleView.BuildTable
- Property LiveTable.Table
- Method Table.AddColumn
- Method Table.AddGroup
- Method Table.AddPlainRow
- Method Table.AddRow
- Method Table.AddValues
- Method Table.For``1
- Method Table.SetFooter
- Method Table.AddColumn
- Method Table.AddGroup
- Method Table.AddPlainRow
- Method Table.AddRow
- Method Table.AddValues
- Method Table.Column
- Method Table.Refresh
- Method Table.SetFooter
Accepted by parameters 3
- Constructor LiveTable.LiveTable
- Extension method LiveTable.WithTable
- Method LiveTableFluent.WithTable
Type Parameters
- T
- The item type.
Methods
public Table<T?> Column(Func<T?, Object?> value, Action<TableColumn>? configure = null, String? expression = null) #Table<T?>Adds a column read from each item. The header comes from the expression (s => s.Name is "Name", s => s.Address.City is "City"); set another with c => c.WithHeader("...").
Parameters
- value System.Func<T?, System.Object?>
- Reads the value from an item.
- configure System.Action<ConsoleMonster.Widgets.TableColumn>? = null
- Configures the column (priority, presenter, overflow...), or null.
- expression System.String? = null
- Filled in by the compiler from value; leave it out.
Returns
This table.
public Table<T?> Column(String header, Func<T?, Object?> value, Action<TableColumn>? configure = null) #Table<T?>Adds a column read from each item, with a header.
Parameters
- header System.String
- The header (markup).
- value System.Func<T?, System.Object?>
- Reads the value from an item.
- configure System.Action<ConsoleMonster.Widgets.TableColumn>? = null
- Configures the column, or null.
Returns
This table.
public Table<T?> Refresh() #Table<T?>Reads the items again at the next layout (after the collection changed).
Returns
This table.
Inherited Methods
public Table AddPlainRow(params String?[] values) #TableParameters
- values String?[]
public Table AddRow(params TableCell[] cells) #TableParameters
- cells TableCell[]
public Table AddValues(params Object?[] values) #TableParameters
- values Object?[]
public virtual Boolean Equals(Object? obj) #BooleanParameters
- obj Object?
public Size Measure(Constraints constraints, RenderContext context) #SizeParameters
- constraints Constraints
- context RenderContext