Skip to content
ConsoleMonster

API Reference

Class

HelpView

Namespace ConsoleMonster.Widgets
Assembly ConsoleMonster
Implements
Modifiers sealed

A command's help (HelpTopic): the name and synopsis, the syntax of each parameter set with the parameters, types and optional parts told apart, the description, a parameter table (type, required, position, pipeline input, default, description), the examples with highlighted code, inputs, outputs, notes and related links. Everything is printed as it grows, so it reads well through a pager. Show-ConsoleHelp is the PowerShell face.

Inheritance

  • Object
  • HelpView

Usage

Explore 12 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Accepted by parameters 6

Constructors

public HelpView(HelpTopic topic) #

Creates the view.

Parameters

topic ConsoleMonster.Help.HelpTopic requiredposition: 0
The help.

Methods

public Size Measure(Constraints constraints, RenderContext context) #
Returns: Size

Returns the size the widget wants within the constraints.

Parameters

constraints ConsoleMonster.Layout.Constraints requiredposition: 0
The space offered.
context ConsoleMonster.Canvas.RenderContext requiredposition: 1
Profile, theme and glyphs.

Returns

The desired size, never larger than the constraints.

public Void Render(Region region, RenderContext context) #
Returns: Void

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

Parameters

region ConsoleMonster.Canvas.Region requiredposition: 0
The target region.
context ConsoleMonster.Canvas.RenderContext requiredposition: 1
Profile, theme and glyphs.

Properties

public HelpTopic Topic { get; } #

The help shown.

public Boolean ShowExamples { get; set; } #

Whether the examples are shown (default true).

public Boolean ShowParameters { get; set; } #

Whether the parameter table is shown (default true).

Extension Methods

public static HelpView WithShowExamples(HelpView helpView, Boolean value = true) #
Returns: HelpView

Sets HelpView.ShowExamples: Whether the examples are shown (default true).

Parameters

helpView ConsoleMonster.Widgets.HelpView requiredposition: 0
The instance.
value System.Boolean = true optionalposition: 1
The value (default true).

Returns

The same instance.

public static HelpView WithShowParameters(HelpView helpView, Boolean value = true) #
Returns: HelpView

Sets HelpView.ShowParameters: Whether the parameter table is shown (default true).

Parameters

helpView ConsoleMonster.Widgets.HelpView requiredposition: 0
The instance.
value System.Boolean = true optionalposition: 1
The value (default true).

Returns

The same instance.

public static HelpView WithTopic(HelpView helpView, Action<HelpTopic> configure) #
Returns: HelpView

Configures HelpView.Topic in place: The help shown.

Parameters

helpView ConsoleMonster.Widgets.HelpView requiredposition: 0
The instance.
configure System.Action<ConsoleMonster.Help.HelpTopic> requiredposition: 1
Configures the value.

Returns

The same instance.