Skip to content
ConsoleMonster
Class

ServicesView

ConsoleMonster.Hosting

Namespace
ConsoleMonster.Hosting
Assembly
ConsoleMonster.Hosting
Implements
IWidget
Modifiers
sealed

The dashboard's list of hosted services and reported entries: a status symbol, the name, the state, elapsed time and the detail. Hosted services show their monotonic lifetime, frozen at their own terminal outcome; reported entries show time in their current state. Each frame reads a fresh snapshot, so the list can change from any thread.

Inheritance

  • object
  • ServicesView

Constructors

public ServicesView(IConsoleDashboard dashboard, Func<DateTimeOffset>? clock = null) #

Creates the view.

Parameters

dashboard ConsoleMonster.Hosting.IConsoleDashboard required
The statuses to show.
clock System.Func<System.DateTimeOffset>? = null optional
The current time (for tests), or null for the system clock.

Methods

public Size Measure(Constraints constraints, RenderContext context) #

Returns the size the widget wants within the constraints.

Parameters

constraints ConsoleMonster.Layout.Constraints required
The space offered.
context ConsoleMonster.Canvas.RenderContext required
Profile, theme and glyphs.

Returns

Size The desired size, never larger than the constraints.
public void Render(Region region, RenderContext context) #

Renders into a region. The region may be smaller or larger than the measured size.

Parameters

region ConsoleMonster.Canvas.Region required
The target region.
context ConsoleMonster.Canvas.RenderContext required
Profile, theme and glyphs.