API Reference
ConsoleView
Picks the best view for data and builds it: one object becomes an inspector, objects of one shape a table (cards when narrow), hierarchical objects a tree, a numeric series a chart, strings highlighted code when a language is detected and text otherwise. Columns get presenters from their member names and types (CellPresenters.ForMember). Show-Console is the PowerShell front end.
Inheritance
- Object
- ConsoleView
Methods
public static IWidget Auto(Object? value, ConsoleViewOptions? options = null) #IWidgetBuilds the automatic view for a value: a sequence is shown as its items, anything else as one item.
Parameters
- value System.Object?
- The value.
- options ConsoleMonster.Views.ConsoleViewOptions? = null
- Options, or null.
Returns
The widget.
public static IWidget Auto(IReadOnlyList<Object?> items, ConsoleViewOptions? options = null) #IWidgetBuilds the automatic (or requested) view for some items.
Parameters
- items System.Collections.Generic.IReadOnlyList<System.Object?>
- The items.
- options ConsoleMonster.Views.ConsoleViewOptions? = null
- Options, or null.
Returns
The widget.
public static BarChart BuildChart(IReadOnlyList<Object?> items, ConsoleViewOptions? options = null) #BarChartA bar chart: numbers as they are, or objects as label (first text member) and value (first number member).
Parameters
- items System.Collections.Generic.IReadOnlyList<System.Object?>
- The items.
- options ConsoleMonster.Views.ConsoleViewOptions? = null
- Options, or null.
Returns
The chart.
public static Table BuildTable(IReadOnlyList<Object?> items, ConsoleViewOptions? options = null) #TableA table of the items' members, with presenters chosen by member name and type.
Parameters
- items System.Collections.Generic.IReadOnlyList<System.Object?>
- The items.
- options ConsoleMonster.Views.ConsoleViewOptions? = null
- Options, or null.
Returns
The table.
public static Tree BuildTree(IReadOnlyList<Object?> items, ConsoleViewOptions? options = null) #TreeA tree of the items and their children (ConsoleViewOptions.ChildProperty or found automatically).
Parameters
- items System.Collections.Generic.IReadOnlyList<System.Object?>
- The items.
- options ConsoleMonster.Views.ConsoleViewOptions? = null
- Options, or null.
Returns
The tree.
public static ConsoleViewKind Decide(IReadOnlyList<Object?> items, ConsoleViewOptions? options = null) #ConsoleViewKindThe view the data gets (see the class remarks): ConsoleViewOptions.View wins when set.
Parameters
- items System.Collections.Generic.IReadOnlyList<System.Object?>
- The items.
- options ConsoleMonster.Views.ConsoleViewOptions? = null
- Options, or null.
Returns
The view.
Inherited Methods
public virtual Boolean Equals(Object? obj) #BooleanParameters
- obj Object?