Skip to content
ConsoleMonster

API Reference

Class

TableColumnFluent

Namespace ConsoleMonster.Widgets
Assembly ConsoleMonster
Modifiers static
Attributes
GeneratedCode("ConsoleMonster.Generators", "1.0.0")

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) #
Returns: TableColumn

Adds an item to TableColumn.ToneRules: Conditional tone rules for raw values; the first matching rule wins.

Parameters

tableColumn ConsoleMonster.Widgets.TableColumn requiredposition: 0
The instance.
item ConsoleMonster.Presenters.ToneRule requiredposition: 1
The item.

Returns

The same instance.

AddToneRules 2 overloads
public static TableColumn AddToneRules(TableColumn tableColumn, params ToneRule[] items) #
Returns: TableColumn

Adds items to TableColumn.ToneRules: Conditional tone rules for raw values; the first matching rule wins.

Parameters

tableColumn ConsoleMonster.Widgets.TableColumn requiredposition: 0
The instance.
items ConsoleMonster.Presenters.ToneRule[] requiredposition: 1
The items, in order.

Returns

The same instance.

public static TableColumn AddToneRules(TableColumn tableColumn, IEnumerable<ToneRule> items) #
Returns: TableColumn

Adds items to TableColumn.ToneRules: Conditional tone rules for raw values; the first matching rule wins.

Parameters

tableColumn ConsoleMonster.Widgets.TableColumn requiredposition: 0
The instance.
items System.Collections.Generic.IEnumerable<ConsoleMonster.Presenters.ToneRule> requiredposition: 1
The items, in order.

Returns

The same instance.

public static TableColumn WithAggregate(TableColumn tableColumn, ColumnAggregate value) #
Returns: TableColumn

Sets TableColumn.Aggregate: How the column is summarised in group subtotals and the totals row.

Parameters

tableColumn ConsoleMonster.Widgets.TableColumn requiredposition: 0
The instance.
value ConsoleMonster.Widgets.ColumnAggregate requiredposition: 1
The value.

Returns

The same instance.

public static TableColumn WithAlignment(TableColumn tableColumn, HorizontalAlignment? value) #
Returns: TableColumn

Sets TableColumn.Alignment: Alignment; null = automatic (right for numeric columns, left otherwise). The header follows it.

Parameters

tableColumn ConsoleMonster.Widgets.TableColumn requiredposition: 0
The instance.
value ConsoleMonster.Layout.HorizontalAlignment? requiredposition: 1
The value.

Returns

The same instance.

public static TableColumn WithFlexible(TableColumn tableColumn, Boolean value = true) #
Returns: TableColumn

Sets TableColumn.Flexible: Whether this column takes spare width when the table expands (the main text column).

Parameters

tableColumn ConsoleMonster.Widgets.TableColumn requiredposition: 0
The instance.
value System.Boolean = true optionalposition: 1
The value (default true).

Returns

The same instance.

public static TableColumn WithHeader(TableColumn tableColumn, String value) #
Returns: TableColumn

Sets TableColumn.Header: The header (markup).

Parameters

tableColumn ConsoleMonster.Widgets.TableColumn requiredposition: 0
The instance.
value System.String requiredposition: 1
The value.

Returns

The same instance.

public static TableColumn WithIsKey(TableColumn tableColumn, Boolean value = true) #
Returns: TableColumn

Sets TableColumn.IsKey: Whether this is a key column: it never hides, and it titles the record cards.

Parameters

tableColumn ConsoleMonster.Widgets.TableColumn requiredposition: 0
The instance.
value System.Boolean = true optionalposition: 1
The value (default true).

Returns

The same instance.

public static TableColumn WithKey(TableColumn tableColumn, String? value) #
Returns: TableColumn

Sets TableColumn.Key: An identifier for the column (a property name), or null to use the header.

Parameters

tableColumn ConsoleMonster.Widgets.TableColumn requiredposition: 0
The instance.
value System.String? requiredposition: 1
The value.

Returns

The same instance.

public static TableColumn WithMaxLines(TableColumn tableColumn, Int32 value) #
Returns: TableColumn

Sets 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 requiredposition: 0
The instance.
value System.Int32 requiredposition: 1
The value.

Returns

The same instance.

public static TableColumn WithMaxWidth(TableColumn tableColumn, Int32? value) #
Returns: TableColumn

Sets TableColumn.MaxWidth: A maximum width, or null.

Parameters

tableColumn ConsoleMonster.Widgets.TableColumn requiredposition: 0
The instance.
value System.Int32? requiredposition: 1
The value.

Returns

The same instance.

public static TableColumn WithMinWidth(TableColumn tableColumn, Int32? value) #
Returns: TableColumn

Sets TableColumn.MinWidth: A minimum width, or null.

Parameters

tableColumn ConsoleMonster.Widgets.TableColumn requiredposition: 0
The instance.
value System.Int32? requiredposition: 1
The value.

Returns

The same instance.

public static TableColumn WithOverflow(TableColumn tableColumn, ColumnOverflow value) #
Returns: TableColumn

Sets 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 requiredposition: 0
The instance.
value ConsoleMonster.Widgets.ColumnOverflow requiredposition: 1
The value.

Returns

The same instance.

public static TableColumn WithPresenter(TableColumn tableColumn, ICellPresenter? value) #
Returns: TableColumn

Sets 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 requiredposition: 0
The instance.
value ConsoleMonster.Presenters.ICellPresenter? requiredposition: 1
The value.

Returns

The same instance.

public static TableColumn WithPriority(TableColumn tableColumn, Int32 value) #
Returns: TableColumn

Sets 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 requiredposition: 0
The instance.
value System.Int32 requiredposition: 1
The value.

Returns

The same instance.

public static TableColumn WithWidth(TableColumn tableColumn, Int32? value) #
Returns: TableColumn

Sets TableColumn.Width: A fixed width, or null.

Parameters

tableColumn ConsoleMonster.Widgets.TableColumn requiredposition: 0
The instance.
value System.Int32? requiredposition: 1
The value.

Returns

The same instance.

public static TableColumn WithWrap(TableColumn tableColumn, Boolean value = true) #
Returns: TableColumn

Sets 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 requiredposition: 0
The instance.
value System.Boolean = true optionalposition: 1
The value (default true).

Returns

The same instance.