Skip to content
ConsoleMonster
Class

CommandLineHelp

ConsoleMonster.Help

Namespace
ConsoleMonster.Help
Assembly
ConsoleMonster
Modifiers
sealed

Compact command-line help metadata, independent of the host's argument parser.

Inheritance

  • object
  • CommandLineHelp

Usage

Explore 29 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 16

Constructors

public CommandLineHelp() #

Properties

public string Usage { get; set; } #

The concise usage, including the executable name and positional placeholders.

public IList<HelpCommand> Commands { get; } #

Commands in display order, optionally grouped or collapsed by the host.

public string? ValuesHeading { get; set; } #

Heading for a catalog of positional values, or null for the render profile's localized heading.

public IList<HelpValue> Values { get; } #

Named positional values described independently of subcommands.

Extension Methods

public static CommandLineHelp AddCommand(CommandLineHelp commandLineHelp, HelpCommand item) #

Adds an item to CommandLineHelp.Commands: Commands in display order, optionally grouped or collapsed by the host.

Parameters

commandLineHelp ConsoleMonster.Help.CommandLineHelp required
The instance.
item ConsoleMonster.Help.HelpCommand required
The item.

Returns

CommandLineHelp The same instance.
AddCommands 2 overloads
public static CommandLineHelp AddCommands(CommandLineHelp commandLineHelp, params HelpCommand[] items) #

Adds items to CommandLineHelp.Commands: Commands in display order, optionally grouped or collapsed by the host.

Parameters

commandLineHelp ConsoleMonster.Help.CommandLineHelp required
The instance.
items ConsoleMonster.Help.HelpCommand[] required
The items, in order.

Returns

CommandLineHelp The same instance.
public static CommandLineHelp AddCommands(CommandLineHelp commandLineHelp, IEnumerable<HelpCommand> items) #

Adds items to CommandLineHelp.Commands: Commands in display order, optionally grouped or collapsed by the host.

Parameters

commandLineHelp ConsoleMonster.Help.CommandLineHelp required
The instance.
items System.Collections.Generic.IEnumerable<ConsoleMonster.Help.HelpCommand> required
The items, in order.

Returns

CommandLineHelp The same instance.
public static CommandLineHelp AddValue(CommandLineHelp commandLineHelp, HelpValue item) #

Adds an item to CommandLineHelp.Values: Named positional values described independently of subcommands.

Parameters

commandLineHelp ConsoleMonster.Help.CommandLineHelp required
The instance.
item ConsoleMonster.Help.HelpValue required
The item.

Returns

CommandLineHelp The same instance.
AddValues 2 overloads
public static CommandLineHelp AddValues(CommandLineHelp commandLineHelp, params HelpValue[] items) #

Adds items to CommandLineHelp.Values: Named positional values described independently of subcommands.

Parameters

commandLineHelp ConsoleMonster.Help.CommandLineHelp required
The instance.
items ConsoleMonster.Help.HelpValue[] required
The items, in order.

Returns

CommandLineHelp The same instance.
public static CommandLineHelp AddValues(CommandLineHelp commandLineHelp, IEnumerable<HelpValue> items) #

Adds items to CommandLineHelp.Values: Named positional values described independently of subcommands.

Parameters

commandLineHelp ConsoleMonster.Help.CommandLineHelp required
The instance.
items System.Collections.Generic.IEnumerable<ConsoleMonster.Help.HelpValue> required
The items, in order.

Returns

CommandLineHelp The same instance.
public static CommandLineHelp WithUsage(CommandLineHelp commandLineHelp, string value) #

Sets CommandLineHelp.Usage: The concise usage, including the executable name and positional placeholders.

Parameters

commandLineHelp ConsoleMonster.Help.CommandLineHelp required
The instance.
value string required
The value.

Returns

CommandLineHelp The same instance.
public static CommandLineHelp WithValuesHeading(CommandLineHelp commandLineHelp, string? value) #

Sets CommandLineHelp.ValuesHeading: Heading for a catalog of positional values, or null for the render profile's localized heading.

Parameters

commandLineHelp ConsoleMonster.Help.CommandLineHelp required
The instance.
value string? required
The value.

Returns

CommandLineHelp The same instance.