Skip to content
ConsoleMonster
Class

BytesPresenter

ConsoleMonster.Presenters

Namespace
ConsoleMonster.Presenters
Assembly
ConsoleMonster
Implements
ICellPresenter
Modifiers
sealed

A byte count in binary units with the culture's decimal separator: 512 B, 1.4 MB, 2.07 GB.

Inheritance

  • object
  • BytesPresenter

Constructors

public BytesPresenter() #

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? DecimalPlaces { get; set; } #

Fixed decimal places for scaled values, or null for the ordinary compact formatting.

public IDictionary<string, int> UnitDecimalPlaces { get; } #

Optional fixed precision by binary unit name, such as TB. Other units retain BytesPresenter.DecimalPlaces.