Skip to content
ConsoleMonster
Class

HighlightPresenter

ConsoleMonster.Presenters

Namespace
ConsoleMonster.Presenters
Assembly
ConsoleMonster
Implements
ICellPresenter
Modifiers
sealed

Shows cell text highlighted by a language or the smart value highlighter (column option Highlight = 'Smart' or a language name such as 'Json'). The text stays literal; line breaks become spaces in one cell line.

Inheritance

  • object
  • HighlightPresenter

Constructors

public HighlightPresenter(ITextHighlighter highlighter) #

Creates the presenter.

Parameters

highlighter ConsoleMonster.Highlighting.ITextHighlighter required
The highlighter.

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 ITextHighlighter Highlighter { get; } #

The highlighter.

public ThemeToken? TypeRole { get; set; } #

An optional theme tone for type tokens, for signatures whose types are secondary context.