Skip to content
ConsoleMonster
Class

ProgressPresenter

ConsoleMonster.Presenters

Namespace
ConsoleMonster.Presenters
Assembly
ConsoleMonster
Implements
ICellPresenter
Modifiers
sealed

Progress as a small bar and a fraction: ━━━━━──── 18/30. Accepts a fraction (0-1), a percentage string (64%) or a done/total string (18/30).

Inheritance

  • object
  • ProgressPresenter

Constructors

public ProgressPresenter(int barWidth = 8) #

Creates a progress presenter.

Parameters

barWidth int = 8 optional
Cells the bar would like (default 8).

Methods

public PresentedValue Present(object? value, PresenterContext context) #

Presents a value.

Parameters

value object? required
The raw value (may be null).
context ConsoleMonster.Presenters.PresenterContext required
Culture, clock, time zone, column statistics and the render context.

Returns

PresentedValue The presented value.

Properties

public int BarWidth { get; } #

Cells the bar would like.