Skip to content
ConsoleMonster
Class

HelpParameter

ConsoleMonster.Help

Namespace
ConsoleMonster.Help
Assembly
ConsoleMonster
Modifiers
sealed

A parameter's details for the parameter table.

Inheritance

  • object
  • HelpParameter

Usage

Explore 53 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 28

Constructors

public HelpParameter(string name) #

Creates a parameter.

Parameters

name string required
The supplied name. With Named enabled the renderer adds one dash; use -output to display --output.

Properties

public string Name { get; } #

The supplied name. With Named enabled the renderer adds one dash; use -output to display --output.

public bool Named { get; set; } #

Whether the renderer adds one dash (default true). Supply -output for --output; false keeps a command-line positional argument unprefixed.

public string? Type { get; set; } #

The type, or null.

public bool Required { get; set; } #

Whether it is required (in any parameter set).

public string? Position { get; set; } #

The position (0, 1, ...), or null when it is named only.

public string? Pipeline { get; set; } #

How it takes pipeline input (for example ByValue, ByPropertyName), or null for none.

public string? Default { get; set; } #

The default value, or null.

public IList<string> Aliases { get; } #

The aliases, or empty.

public string? Description { get; set; } #

The description, or null.

public string? Group { get; set; } #

The heading command-line help lists the option under (for example Output), or null for the main list.

public bool ValueOptional { get; set; } #

Whether the value may be left out (--report [path] instead of --report <path>).

public string? Syntax { get; set; } #

The literal syntax command-line help shows instead of the names and type (for example --filter <rule>[,<rule>...]), or null to build it.

Extension Methods

public static HelpParameter Aliase(HelpParameter helpParameter, string item) #

Adds an item to HelpParameter.Aliases: The aliases, or empty.

Parameters

helpParameter ConsoleMonster.Help.HelpParameter required
The instance.
item string required
The item.

Returns

HelpParameter The same instance.
public static HelpParameter Aliases(HelpParameter helpParameter, IEnumerable<string> items) #

Adds items to HelpParameter.Aliases: The aliases, or empty.

Parameters

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

Returns

HelpParameter The same instance.
public static HelpParameter Default(HelpParameter helpParameter, string? value) #

Sets HelpParameter.Default: The default value, or null.

Parameters

helpParameter ConsoleMonster.Help.HelpParameter required
The instance.
value string? required
The value.

Returns

HelpParameter The same instance.

Examples

// C# initializer or property     // C# fluent
helpParameter.Default = value;    helpParameter.Default(value);
public static HelpParameter Description(HelpParameter helpParameter, string? value) #

Sets HelpParameter.Description: The description, or null.

Parameters

helpParameter ConsoleMonster.Help.HelpParameter required
The instance.
value string? required
The value.

Returns

HelpParameter The same instance.

Examples

// C# initializer or property         // C# fluent
helpParameter.Description = value;    helpParameter.Description(value);
public static HelpParameter Group(HelpParameter helpParameter, string? value) #

Sets HelpParameter.Group: The heading command-line help lists the option under (for example Output), or null for the main list.

Parameters

helpParameter ConsoleMonster.Help.HelpParameter required
The instance.
value string? required
The value.

Returns

HelpParameter The same instance.

Examples

// C# initializer or property    // C# fluent
helpParameter.Group = value;     helpParameter.Group(value);
public static HelpParameter Named(HelpParameter helpParameter, bool value = true) #

Sets HelpParameter.Named: Whether the renderer adds one dash (default true). Supply -output for --output; false keeps a command-line positional argument unprefixed.

Parameters

helpParameter ConsoleMonster.Help.HelpParameter required
The instance.
value bool = true optional
The value; true when omitted.

Returns

HelpParameter The same instance.

Examples

// C# initializer or property    // C# fluent
helpParameter.Named = value;     helpParameter.Named(value);
public static HelpParameter Pipeline(HelpParameter helpParameter, string? value) #

Sets HelpParameter.Pipeline: How it takes pipeline input (for example ByValue, ByPropertyName), or null for none.

Parameters

helpParameter ConsoleMonster.Help.HelpParameter required
The instance.
value string? required
The value.

Returns

HelpParameter The same instance.

Examples

// C# initializer or property      // C# fluent
helpParameter.Pipeline = value;    helpParameter.Pipeline(value);
public static HelpParameter Position(HelpParameter helpParameter, string? value) #

Sets HelpParameter.Position: The position (0, 1, ...), or null when it is named only.

Parameters

helpParameter ConsoleMonster.Help.HelpParameter required
The instance.
value string? required
The value.

Returns

HelpParameter The same instance.

Examples

// C# initializer or property      // C# fluent
helpParameter.Position = value;    helpParameter.Position(value);
public static HelpParameter Required(HelpParameter helpParameter, bool value = true) #

Sets HelpParameter.Required: Whether it is required (in any parameter set).

Parameters

helpParameter ConsoleMonster.Help.HelpParameter required
The instance.
value bool = true optional
The value; true when omitted.

Returns

HelpParameter The same instance.

Examples

// C# initializer or property      // C# fluent
helpParameter.Required = value;    helpParameter.Required(value);
public static HelpParameter Syntax(HelpParameter helpParameter, string? value) #

Sets HelpParameter.Syntax: The literal syntax command-line help shows instead of the names and type (for example --filter <rule>[,<rule>...]), or null to build it.

Parameters

helpParameter ConsoleMonster.Help.HelpParameter required
The instance.
value string? required
The value.

Returns

HelpParameter The same instance.

Examples

// C# initializer or property    // C# fluent
helpParameter.Syntax = value;    helpParameter.Syntax(value);
public static HelpParameter Type(HelpParameter helpParameter, string? value) #

Sets HelpParameter.Type: The type, or null.

Parameters

helpParameter ConsoleMonster.Help.HelpParameter required
The instance.
value string? required
The value.

Returns

HelpParameter The same instance.

Examples

// C# initializer or property    // C# fluent
helpParameter.Type = value;      helpParameter.Type(value);
public static HelpParameter ValueOptional(HelpParameter helpParameter, bool value = true) #

Sets HelpParameter.ValueOptional: Whether the value may be left out (--report [path] instead of --report <path>).

Parameters

helpParameter ConsoleMonster.Help.HelpParameter required
The instance.
value bool = true optional
The value; true when omitted.

Returns

HelpParameter The same instance.

Examples

// C# initializer or property           // C# fluent
helpParameter.ValueOptional = value;    helpParameter.ValueOptional(value);