API Reference
TableColumnFluent
The fluent methods of TableColumn, generated from its public properties: With... sets a property and Add... adds to a collection, both returning the same instance.
Inheritance
- Object
- TableColumnFluent
Methods
public static TableColumn AddToneRule(TableColumn tableColumn, ToneRule item) #TableColumnAdds an item to TableColumn.ToneRules: Conditional tone rules for raw values; the first matching rule wins.
Parameters
- tableColumn ConsoleMonster.Widgets.TableColumn
- The instance.
- item ConsoleMonster.Presenters.ToneRule
- The item.
Returns
The same instance.
public static TableColumn AddToneRules(TableColumn tableColumn, params ToneRule[] items) #TableColumnAdds items to TableColumn.ToneRules: Conditional tone rules for raw values; the first matching rule wins.
Parameters
- tableColumn ConsoleMonster.Widgets.TableColumn
- The instance.
- items ConsoleMonster.Presenters.ToneRule[]
- The items, in order.
Returns
The same instance.
public static TableColumn AddToneRules(TableColumn tableColumn, IEnumerable<ToneRule> items) #TableColumnAdds items to TableColumn.ToneRules: Conditional tone rules for raw values; the first matching rule wins.
Parameters
- tableColumn ConsoleMonster.Widgets.TableColumn
- The instance.
- items System.Collections.Generic.IEnumerable<ConsoleMonster.Presenters.ToneRule>
- The items, in order.
Returns
The same instance.
public static TableColumn WithAggregate(TableColumn tableColumn, ColumnAggregate value) #TableColumnSets TableColumn.Aggregate: How the column is summarised in group subtotals and the totals row.
Parameters
- tableColumn ConsoleMonster.Widgets.TableColumn
- The instance.
- value ConsoleMonster.Widgets.ColumnAggregate
- The value.
Returns
The same instance.
public static TableColumn WithAlignment(TableColumn tableColumn, HorizontalAlignment? value) #TableColumnSets TableColumn.Alignment: Alignment; null = automatic (right for numeric columns, left otherwise). The header follows it.
Parameters
- tableColumn ConsoleMonster.Widgets.TableColumn
- The instance.
- value ConsoleMonster.Layout.HorizontalAlignment?
- The value.
Returns
The same instance.
public static TableColumn WithFlexible(TableColumn tableColumn, Boolean value = true) #TableColumnSets TableColumn.Flexible: Whether this column takes spare width when the table expands (the main text column).
Parameters
- tableColumn ConsoleMonster.Widgets.TableColumn
- The instance.
- value System.Boolean = true
- The value (default true).
Returns
The same instance.
public static TableColumn WithHeader(TableColumn tableColumn, String value) #TableColumnSets TableColumn.Header: The header (markup).
Parameters
- tableColumn ConsoleMonster.Widgets.TableColumn
- The instance.
- value System.String
- The value.
Returns
The same instance.
public static TableColumn WithIsKey(TableColumn tableColumn, Boolean value = true) #TableColumnSets TableColumn.IsKey: Whether this is a key column: it never hides, and it titles the record cards.
Parameters
- tableColumn ConsoleMonster.Widgets.TableColumn
- The instance.
- value System.Boolean = true
- The value (default true).
Returns
The same instance.
public static TableColumn WithKey(TableColumn tableColumn, String? value) #TableColumnSets TableColumn.Key: An identifier for the column (a property name), or null to use the header.
Parameters
- tableColumn ConsoleMonster.Widgets.TableColumn
- The instance.
- value System.String?
- The value.
Returns
The same instance.
public static TableColumn WithMaxLines(TableColumn tableColumn, Int32 value) #TableColumnSets TableColumn.MaxLines: The most lines a wrapped value may use: 0 (the default) follows the table's Table.WrapLines (3 unless changed), TableColumn.Unlimited shows every line. The last line ends with an ellipsis when cut.
Parameters
- tableColumn ConsoleMonster.Widgets.TableColumn
- The instance.
- value System.Int32
- The value.
Returns
The same instance.
public static TableColumn WithMaxWidth(TableColumn tableColumn, Int32? value) #TableColumnSets TableColumn.MaxWidth: A maximum width, or null.
Parameters
- tableColumn ConsoleMonster.Widgets.TableColumn
- The instance.
- value System.Int32?
- The value.
Returns
The same instance.
public static TableColumn WithMinWidth(TableColumn tableColumn, Int32? value) #TableColumnSets TableColumn.MinWidth: A minimum width, or null.
Parameters
- tableColumn ConsoleMonster.Widgets.TableColumn
- The instance.
- value System.Int32?
- The value.
Returns
The same instance.
public static TableColumn WithOverflow(TableColumn tableColumn, ColumnOverflow value) #TableColumnSets TableColumn.Overflow: What happens to values wider than the column: wrap (default), truncate at the end, truncate in the middle, or never shorten.
Parameters
- tableColumn ConsoleMonster.Widgets.TableColumn
- The instance.
- value ConsoleMonster.Widgets.ColumnOverflow
- The value.
Returns
The same instance.
public static TableColumn WithPresenter(TableColumn tableColumn, ICellPresenter? value) #TableColumnSets TableColumn.Presenter: How raw cell values are shown, or null for automatic (by value type). Markup cells are shown as written.
Parameters
- tableColumn ConsoleMonster.Widgets.TableColumn
- The instance.
- value ConsoleMonster.Presenters.ICellPresenter?
- The value.
Returns
The same instance.
public static TableColumn WithPriority(TableColumn tableColumn, Int32 value) #TableColumnSets TableColumn.Priority: The column's importance when the table is too wide: columns with the lowest priority hide first (ties hide from the right). The default is 0. Key columns never hide.
Parameters
- tableColumn ConsoleMonster.Widgets.TableColumn
- The instance.
- value System.Int32
- The value.
Returns
The same instance.
public static TableColumn WithWidth(TableColumn tableColumn, Int32? value) #TableColumnSets TableColumn.Width: A fixed width, or null.
Parameters
- tableColumn ConsoleMonster.Widgets.TableColumn
- The instance.
- value System.Int32?
- The value.
Returns
The same instance.
public static TableColumn WithWrap(TableColumn tableColumn, Boolean value = true) #TableColumnSets TableColumn.Wrap: Whether values may wrap onto several lines when space is short (default true). Setting it maps to TableColumn.Overflow: true is ColumnOverflow.Wrap, false is ColumnOverflow.Never (identifiers keep their width while other columns give way).
Parameters
- tableColumn ConsoleMonster.Widgets.TableColumn
- The instance.
- value System.Boolean = true
- The value (default true).
Returns
The same instance.
Inherited Methods
public virtual Boolean Equals(Object? obj) #BooleanParameters
- obj Object?