Skip to content
ConsoleMonster
Class

HelpView

ConsoleMonster.Widgets

Namespace
ConsoleMonster.Widgets
Assembly
ConsoleMonster
Implements
IWidget
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.

Returned or exposed by 6

Accepted by parameters 6

Constructors

public HelpView(HelpTopic topic) #

Creates the view.

Parameters

topic ConsoleMonster.Help.HelpTopic required
The help.

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.

Properties

public HelpTopic Topic { get; } #

The help shown.

public bool ShowExamples { get; set; } #

Whether the examples are shown (default true).

public bool ShowParameters { get; set; } #

Whether the parameter table is shown (default true).

Extension Methods

public static HelpView ShowExamples(HelpView helpView, bool value = true) #

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

Parameters

helpView ConsoleMonster.Widgets.HelpView required
The instance.
value bool = true optional
The value; true when omitted.

Returns

HelpView The same instance.

Examples

// C# initializer or property     // C# fluent
helpView.ShowExamples = value;    helpView.ShowExamples(value);
public static HelpView ShowParameters(HelpView helpView, bool value = true) #

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

Parameters

helpView ConsoleMonster.Widgets.HelpView required
The instance.
value bool = true optional
The value; true when omitted.

Returns

HelpView The same instance.

Examples

// C# initializer or property       // C# fluent
helpView.ShowParameters = value;    helpView.ShowParameters(value);
public static HelpView Topic(HelpView helpView, Action<HelpTopic> configure) #

Configures HelpView.Topic in place: The help shown.

Parameters

helpView ConsoleMonster.Widgets.HelpView required
The instance.
configure System.Action<ConsoleMonster.Help.HelpTopic> required
Configures the value.

Returns

HelpView The same instance.