Skip to content
ConsoleMonster
Class

HelpTopic

ConsoleMonster.Help

Namespace
ConsoleMonster.Help
Assembly
ConsoleMonster
Modifiers
sealed

A command's help, as structured data: what HelpView shows. Show-ConsoleHelp fills it from PowerShell's Get-Help objects; .NET hosts can fill it from their own command descriptions.

Inheritance

  • object
  • HelpTopic

Usage

Explore 88 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 45

Constructors

public HelpTopic(string name) #

Creates a topic.

Parameters

name string required
The command name.

Properties

public string Name { get; } #

The command name.

public string? Synopsis { get; set; } #

The one-line summary, or null.

public CommandLineHelp? CommandLine { get; set; } #

Optional compact command-line layout; null retains the PowerShell help layout.

public string? Module { get; set; } #

The module the command comes from, or null; the document viewer shows it as a badge.

public string? Version { get; set; } #

The command's version, or null; the document viewer shows it as a badge.

public bool SupportsWhatIf { get; set; } #

Whether the command takes -WhatIf and -Confirm; the document viewer shows it as a badge.

public string? Notice { get; set; } #

A note shown muted under the name (for example that only partial help is installed), or null.

public IList<string> Description { get; } #

The description paragraphs.

public IList<HelpSyntax> Syntax { get; } #

One syntax per parameter set.

public IList<HelpParameter> Parameters { get; } #

The parameters, in help order.

public bool CommonParameters { get; set; } #

Whether the command takes the common parameters (-Verbose, -ErrorAction and the others).

public IList<HelpExample> Examples { get; } #

The examples.

public IList<string> Inputs { get; } #

The input types (with an optional description after a tab).

public IList<string> Outputs { get; } #

The output types (with an optional description after a tab).

public IList<string> Notes { get; } #

The notes paragraphs.

Extension Methods

CommandLine 2 overloads
public static HelpTopic CommandLine(HelpTopic helpTopic, CommandLineHelp? value) #

Sets HelpTopic.CommandLine: Optional compact command-line layout; null retains the PowerShell help layout.

Parameters

helpTopic ConsoleMonster.Help.HelpTopic required
The instance.
value ConsoleMonster.Help.CommandLineHelp? required
The value.

Returns

HelpTopic The same instance.

Examples

// C# initializer or property     // C# fluent
helpTopic.CommandLine = value;    helpTopic.CommandLine(value);
public static HelpTopic CommandLine(HelpTopic helpTopic, Action<CommandLineHelp> configure) #

Configures HelpTopic.CommandLine in place (creating it when not set): Optional compact command-line layout; null retains the PowerShell help layout.

Parameters

helpTopic ConsoleMonster.Help.HelpTopic required
The instance.
configure System.Action<ConsoleMonster.Help.CommandLineHelp> required
Configures the value.

Returns

HelpTopic The same instance.
public static HelpTopic CommonParameters(HelpTopic helpTopic, bool value = true) #

Sets HelpTopic.CommonParameters: Whether the command takes the common parameters (-Verbose, -ErrorAction and the others).

Parameters

helpTopic ConsoleMonster.Help.HelpTopic required
The instance.
value bool = true optional
The value; true when omitted.

Returns

HelpTopic The same instance.

Examples

// C# initializer or property          // C# fluent
helpTopic.CommonParameters = value;    helpTopic.CommonParameters(value);
Description 2 overloads
public static HelpTopic Description(HelpTopic helpTopic, string item) #

Adds an item to HelpTopic.Description: The description paragraphs.

Parameters

helpTopic ConsoleMonster.Help.HelpTopic required
The instance.
item string required
The item.

Returns

HelpTopic The same instance.
public static HelpTopic Description(HelpTopic helpTopic, IEnumerable<string> items) #

Adds items to HelpTopic.Description: The description paragraphs.

Parameters

helpTopic ConsoleMonster.Help.HelpTopic required
The instance.
items System.Collections.Generic.IEnumerable<string> required
The items, in order.

Returns

HelpTopic The same instance.
public static HelpTopic Example(HelpTopic helpTopic, HelpExample item) #

Adds an item to HelpTopic.Examples: The examples.

Parameters

helpTopic ConsoleMonster.Help.HelpTopic required
The instance.
item ConsoleMonster.Help.HelpExample required
The item.

Returns

HelpTopic The same instance.
public static HelpTopic Examples(HelpTopic helpTopic, IEnumerable<HelpExample> items) #

Adds items to HelpTopic.Examples: The examples.

Parameters

helpTopic ConsoleMonster.Help.HelpTopic required
The instance.
items System.Collections.Generic.IEnumerable<ConsoleMonster.Help.HelpExample> required
The items, in order.

Returns

HelpTopic The same instance.
public static HelpTopic Input(HelpTopic helpTopic, string item) #

Adds an item to HelpTopic.Inputs: The input types (with an optional description after a tab).

Parameters

helpTopic ConsoleMonster.Help.HelpTopic required
The instance.
item string required
The item.

Returns

HelpTopic The same instance.
public static HelpTopic Inputs(HelpTopic helpTopic, IEnumerable<string> items) #

Adds items to HelpTopic.Inputs: The input types (with an optional description after a tab).

Parameters

helpTopic ConsoleMonster.Help.HelpTopic required
The instance.
items System.Collections.Generic.IEnumerable<string> required
The items, in order.

Returns

HelpTopic The same instance.
public static HelpTopic Module(HelpTopic helpTopic, string? value) #

Sets HelpTopic.Module: The module the command comes from, or null; the document viewer shows it as a badge.

Parameters

helpTopic ConsoleMonster.Help.HelpTopic required
The instance.
value string? required
The value.

Returns

HelpTopic The same instance.

Examples

// C# initializer or property    // C# fluent
helpTopic.Module = value;        helpTopic.Module(value);
public static HelpTopic Note(HelpTopic helpTopic, string item) #

Adds an item to HelpTopic.Notes: The notes paragraphs.

Parameters

helpTopic ConsoleMonster.Help.HelpTopic required
The instance.
item string required
The item.

Returns

HelpTopic The same instance.
public static HelpTopic Notes(HelpTopic helpTopic, IEnumerable<string> items) #

Adds items to HelpTopic.Notes: The notes paragraphs.

Parameters

helpTopic ConsoleMonster.Help.HelpTopic required
The instance.
items System.Collections.Generic.IEnumerable<string> required
The items, in order.

Returns

HelpTopic The same instance.
public static HelpTopic Notice(HelpTopic helpTopic, string? value) #

Sets HelpTopic.Notice: A note shown muted under the name (for example that only partial help is installed), or null.

Parameters

helpTopic ConsoleMonster.Help.HelpTopic required
The instance.
value string? required
The value.

Returns

HelpTopic The same instance.

Examples

// C# initializer or property    // C# fluent
helpTopic.Notice = value;        helpTopic.Notice(value);
public static HelpTopic Output(HelpTopic helpTopic, string item) #

Adds an item to HelpTopic.Outputs: The output types (with an optional description after a tab).

Parameters

helpTopic ConsoleMonster.Help.HelpTopic required
The instance.
item string required
The item.

Returns

HelpTopic The same instance.
public static HelpTopic Outputs(HelpTopic helpTopic, IEnumerable<string> items) #

Adds items to HelpTopic.Outputs: The output types (with an optional description after a tab).

Parameters

helpTopic ConsoleMonster.Help.HelpTopic required
The instance.
items System.Collections.Generic.IEnumerable<string> required
The items, in order.

Returns

HelpTopic The same instance.
public static HelpTopic Parameter(HelpTopic helpTopic, HelpParameter item) #

Adds an item to HelpTopic.Parameters: The parameters, in help order.

Parameters

helpTopic ConsoleMonster.Help.HelpTopic required
The instance.
item ConsoleMonster.Help.HelpParameter required
The item.

Returns

HelpTopic The same instance.
public static HelpTopic Parameters(HelpTopic helpTopic, IEnumerable<HelpParameter> items) #

Adds items to HelpTopic.Parameters: The parameters, in help order.

Parameters

helpTopic ConsoleMonster.Help.HelpTopic required
The instance.
items System.Collections.Generic.IEnumerable<ConsoleMonster.Help.HelpParameter> required
The items, in order.

Returns

HelpTopic The same instance.
public static HelpTopic SupportsWhatIf(HelpTopic helpTopic, bool value = true) #

Sets HelpTopic.SupportsWhatIf: Whether the command takes -WhatIf and -Confirm; the document viewer shows it as a badge.

Parameters

helpTopic ConsoleMonster.Help.HelpTopic required
The instance.
value bool = true optional
The value; true when omitted.

Returns

HelpTopic The same instance.

Examples

// C# initializer or property        // C# fluent
helpTopic.SupportsWhatIf = value;    helpTopic.SupportsWhatIf(value);
public static HelpTopic Synopsis(HelpTopic helpTopic, string? value) #

Sets HelpTopic.Synopsis: The one-line summary, or null.

Parameters

helpTopic ConsoleMonster.Help.HelpTopic required
The instance.
value string? required
The value.

Returns

HelpTopic The same instance.

Examples

// C# initializer or property    // C# fluent
helpTopic.Synopsis = value;      helpTopic.Synopsis(value);
Syntax 2 overloads
public static HelpTopic Syntax(HelpTopic helpTopic, HelpSyntax item) #

Adds an item to HelpTopic.Syntax: One syntax per parameter set.

Parameters

helpTopic ConsoleMonster.Help.HelpTopic required
The instance.
item ConsoleMonster.Help.HelpSyntax required
The item.

Returns

HelpTopic The same instance.
public static HelpTopic Syntax(HelpTopic helpTopic, IEnumerable<HelpSyntax> items) #

Adds items to HelpTopic.Syntax: One syntax per parameter set.

Parameters

helpTopic ConsoleMonster.Help.HelpTopic required
The instance.
items System.Collections.Generic.IEnumerable<ConsoleMonster.Help.HelpSyntax> required
The items, in order.

Returns

HelpTopic The same instance.
public static HelpTopic Version(HelpTopic helpTopic, string? value) #

Sets HelpTopic.Version: The command's version, or null; the document viewer shows it as a badge.

Parameters

helpTopic ConsoleMonster.Help.HelpTopic required
The instance.
value string? required
The value.

Returns

HelpTopic The same instance.

Examples

// C# initializer or property    // C# fluent
helpTopic.Version = value;       helpTopic.Version(value);