Skip to content
ConsoleMonster

API Reference

Class

ProgressBarFluent

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

The fluent methods of ProgressBar, generated from its public properties: With... sets a property and Add... adds to a collection, both returning the same instance.

Inheritance

  • Object
  • ProgressBarFluent

Methods

public static ProgressBar AddColumn(ProgressBar progressBar, ProgressColumn item) #
Returns: ProgressBar

Adds an item to ProgressBar.Columns: The columns of the bar's row (see ProgressColumns: description, bar, percent, count, elapsed, remaining time, rate, custom...), or null (default) for the classic label, bar, percentage and count. With columns set, the stream heartbeat line summarises the bar through them.

Parameters

progressBar ConsoleMonster.Widgets.ProgressBar requiredposition: 0
The instance.
item ConsoleMonster.Widgets.ProgressColumn requiredposition: 1
The item.

Returns

The same instance.

AddColumns 2 overloads
public static ProgressBar AddColumns(ProgressBar progressBar, params ProgressColumn[] items) #
Returns: ProgressBar

Adds items to ProgressBar.Columns: The columns of the bar's row (see ProgressColumns: description, bar, percent, count, elapsed, remaining time, rate, custom...), or null (default) for the classic label, bar, percentage and count. With columns set, the stream heartbeat line summarises the bar through them.

Parameters

progressBar ConsoleMonster.Widgets.ProgressBar requiredposition: 0
The instance.
items ConsoleMonster.Widgets.ProgressColumn[] requiredposition: 1
The items, in order.

Returns

The same instance.

public static ProgressBar AddColumns(ProgressBar progressBar, IEnumerable<ProgressColumn> items) #
Returns: ProgressBar

Adds items to ProgressBar.Columns: The columns of the bar's row (see ProgressColumns: description, bar, percent, count, elapsed, remaining time, rate, custom...), or null (default) for the classic label, bar, percentage and count. With columns set, the stream heartbeat line summarises the bar through them.

Parameters

progressBar ConsoleMonster.Widgets.ProgressBar requiredposition: 0
The instance.
items System.Collections.Generic.IEnumerable<ConsoleMonster.Widgets.ProgressColumn> requiredposition: 1
The items, in order.

Returns

The same instance.

public static ProgressBar WithColumns(ProgressBar progressBar, IList<ProgressColumn>? value) #
Returns: ProgressBar

Sets ProgressBar.Columns: The columns of the bar's row (see ProgressColumns: description, bar, percent, count, elapsed, remaining time, rate, custom...), or null (default) for the classic label, bar, percentage and count. With columns set, the stream heartbeat line summarises the bar through them.

Parameters

progressBar ConsoleMonster.Widgets.ProgressBar requiredposition: 0
The instance.
value System.Collections.Generic.IList<ConsoleMonster.Widgets.ProgressColumn>? requiredposition: 1
The value.

Returns

The same instance.

WithCountColumn 2 overloads
public static ProgressBar WithCountColumn(ProgressBar progressBar, ColumnFormat value) #
Returns: ProgressBar

Sets ProgressBar.CountColumn: Layout of the value in the value/total count (default right-aligned). The value reserves the width of the total, so the bar keeps its length as the value grows from 9 to 10.

Parameters

progressBar ConsoleMonster.Widgets.ProgressBar requiredposition: 0
The instance.
value ConsoleMonster.Layout.ColumnFormat requiredposition: 1
The value.

Returns

The same instance.

public static ProgressBar WithCountColumn(ProgressBar progressBar, Action<ColumnFormat> configure) #
Returns: ProgressBar

Configures ProgressBar.CountColumn in place: Layout of the value in the value/total count (default right-aligned). The value reserves the width of the total, so the bar keeps its length as the value grows from 9 to 10.

Parameters

progressBar ConsoleMonster.Widgets.ProgressBar requiredposition: 0
The instance.
configure System.Action<ConsoleMonster.Layout.ColumnFormat> requiredposition: 1
Configures the value.

Returns

The same instance.

public static ProgressBar WithLabel(ProgressBar progressBar, String value) #
Returns: ProgressBar

Sets ProgressBar.Label: The label (markup).

Parameters

progressBar ConsoleMonster.Widgets.ProgressBar requiredposition: 0
The instance.
value System.String requiredposition: 1
The value.

Returns

The same instance.

public static ProgressBar WithLabelWidth(ProgressBar progressBar, Int32? value) #
Returns: ProgressBar

Sets ProgressBar.LabelWidth: A fixed label column width, or null to fit the label.

Parameters

progressBar ConsoleMonster.Widgets.ProgressBar requiredposition: 0
The instance.
value System.Int32? requiredposition: 1
The value.

Returns

The same instance.

public static ProgressBar WithRateWindow(ProgressBar progressBar, TimeSpan value) #
Returns: ProgressBar

Sets ProgressBar.RateWindow: The moving window that smooths the rate and the remaining time (default 10 seconds).

Parameters

progressBar ConsoleMonster.Widgets.ProgressBar requiredposition: 0
The instance.
value System.TimeSpan requiredposition: 1
The value.

Returns

The same instance.

public static ProgressBar WithShape(ProgressBar progressBar, BarShape value) #
Returns: ProgressBar

Sets ProgressBar.Shape: The bar shape: BarShape.Line (default, a thin stroke) or BarShape.Block (solid blocks).

Parameters

progressBar ConsoleMonster.Widgets.ProgressBar requiredposition: 0
The instance.
value ConsoleMonster.Widgets.BarShape requiredposition: 1
The value.

Returns

The same instance.

public static ProgressBar WithShowCount(ProgressBar progressBar, Boolean value = true) #
Returns: ProgressBar

Sets ProgressBar.ShowCount: Whether the value/total count is shown (default true).

Parameters

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

Returns

The same instance.

public static ProgressBar WithStatus(ProgressBar progressBar, StatusKind value) #
Returns: ProgressBar

Sets ProgressBar.Status: The status; Pass/Fail/Warn change the bar colour once finished.

Parameters

progressBar ConsoleMonster.Widgets.ProgressBar requiredposition: 0
The instance.
value ConsoleMonster.Styling.StatusKind requiredposition: 1
The value.

Returns

The same instance.

public static ProgressBar WithTotal(ProgressBar progressBar, Double value) #
Returns: ProgressBar

Sets ProgressBar.Total: The total (default 100).

Parameters

progressBar ConsoleMonster.Widgets.ProgressBar requiredposition: 0
The instance.
value System.Double requiredposition: 1
The value.

Returns

The same instance.

public static ProgressBar WithValue(ProgressBar progressBar, Double value) #
Returns: ProgressBar

Sets ProgressBar.Value: The current value.

Parameters

progressBar ConsoleMonster.Widgets.ProgressBar requiredposition: 0
The instance.
value System.Double requiredposition: 1
The value.

Returns

The same instance.