ProgressBarFluent
ConsoleMonster.Widgets
The fluent methods of ProgressBar, generated from its public properties: A property-named method sets a property and a singular-named method adds to a collection, both returning the same instance.
Inheritance
- object
- ProgressBarFluent
Methods
public static ProgressBar Column(ProgressBar progressBar, ProgressColumn item) #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
- The instance.
- item ConsoleMonster.Widgets.ProgressColumn
- The item.
public static ProgressBar Columns(ProgressBar progressBar, IEnumerable<ProgressColumn> items) #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
- The instance.
- items System.Collections.Generic.IEnumerable<ConsoleMonster.Widgets.ProgressColumn>
- The items, in order.
public static ProgressBar CountColumn(ProgressBar progressBar, ColumnFormat value) #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
- The instance.
- value ConsoleMonster.Layout.ColumnFormat
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Widgets.ProgressBar { CountColumn = value }; Ui.ProgressBar().CountColumn(value);public static ProgressBar CountColumn(ProgressBar progressBar, Action<ColumnFormat> configure) #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
- The instance.
- configure System.Action<ConsoleMonster.Layout.ColumnFormat>
- Configures the value.
public static ProgressBar Label(ProgressBar progressBar, string value) #Sets ProgressBar.Label: The label (markup).
Parameters
- progressBar ConsoleMonster.Widgets.ProgressBar
- The instance.
- value string
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Widgets.ProgressBar { Label = value }; Ui.ProgressBar().Label(value);public static ProgressBar LabelWidth(ProgressBar progressBar, int? value) #Sets ProgressBar.LabelWidth: A fixed label column width, or null to fit the label.
Parameters
- progressBar ConsoleMonster.Widgets.ProgressBar
- The instance.
- value int?
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Widgets.ProgressBar { LabelWidth = value }; Ui.ProgressBar().LabelWidth(value);public static ProgressBar RateWindow(ProgressBar progressBar, TimeSpan value) #Sets ProgressBar.RateWindow: The moving window that smooths the rate and the remaining time (default 10 seconds).
Parameters
- progressBar ConsoleMonster.Widgets.ProgressBar
- The instance.
- value System.TimeSpan
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Widgets.ProgressBar { RateWindow = value }; Ui.ProgressBar().RateWindow(value);public static ProgressBar Shape(ProgressBar progressBar, BarShape value) #Sets ProgressBar.Shape: The bar shape: BarShape.Line (default, a thin stroke) or BarShape.Block (solid blocks).
Parameters
- progressBar ConsoleMonster.Widgets.ProgressBar
- The instance.
- value ConsoleMonster.Widgets.BarShape
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Widgets.ProgressBar { Shape = value }; Ui.ProgressBar().Shape(value);public static ProgressBar ShowCount(ProgressBar progressBar, bool value = true) #Sets ProgressBar.ShowCount: Whether totals other than 100 show value/total (default true); false shows a percentage. A total of 100 always shows only a percentage.
Parameters
- progressBar ConsoleMonster.Widgets.ProgressBar
- The instance.
- value bool = true
- The value; true when omitted.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Widgets.ProgressBar { ShowCount = value }; Ui.ProgressBar().ShowCount(value);public static ProgressBar Status(ProgressBar progressBar, StatusKind value) #Sets ProgressBar.Status: The status; Pass/Fail/Warn change the bar colour once finished.
Parameters
- progressBar ConsoleMonster.Widgets.ProgressBar
- The instance.
- value ConsoleMonster.Styling.StatusKind
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Widgets.ProgressBar { Status = value }; Ui.ProgressBar().Status(value);public static ProgressBar Total(ProgressBar progressBar, double value) #Sets ProgressBar.Total: The total (default 100).
Parameters
- progressBar ConsoleMonster.Widgets.ProgressBar
- The instance.
- value double
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Widgets.ProgressBar { Total = value }; Ui.ProgressBar().Total(value);public static ProgressBar Value(ProgressBar progressBar, double value) #Sets ProgressBar.Value: The current value.
Parameters
- progressBar ConsoleMonster.Widgets.ProgressBar
- The instance.
- value double
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Widgets.ProgressBar { Value = value }; Ui.ProgressBar().Value(value);