Edit

Share via


HelpOption Class

Definition

A standard option that indicates that command line help should be displayed.

public ref class HelpOption sealed : System::CommandLine::Option
public sealed class HelpOption : System.CommandLine.Option
type HelpOption = class
    inherit Option
Public NotInheritable Class HelpOption
Inherits Option
Inheritance
HelpOption

Constructors

HelpOption()

When added to a Command, it configures the application to show help when one of the following options are specified on the command line:

-h
/h
--help
-?
/?
HelpOption(String, String[])

When added to a Command, it configures the application to show help when given name or one of the aliases are specified on the command line.

Properties

Action

Gets or sets the CommandLineAction for the Option. The handler represents the action that will be performed when the Option is invoked.

Aliases

Gets the unique set of strings that can be used on the command line to specify the Option.

(Inherited from Option)
AllowMultipleArgumentsPerToken

Gets a value that indicates whether multiple argument tokens are allowed for each option identifier token.

(Inherited from Option)
Arity

Gets or sets the arity of the option.

(Inherited from Option)
CompletionSources

Gets the list of completion sources for the option.

(Inherited from Option)
Description

Gets or sets the description of the symbol.

(Inherited from Symbol)
HasDefaultValue

Specifies if a default value is defined for the option.

(Inherited from Option)
HelpName

Gets or sets the name of the Option when displayed in help.

(Inherited from Option)
Hidden

Gets or sets a value indicating whether the symbol is hidden.

(Inherited from Symbol)
Parents

Gets the parent symbols.

(Inherited from Symbol)
Recursive

When set to true, this option will be applied to its immediate parent command or commands and recursively to their subcommands.

(Inherited from Option)
Required

Indicates whether the option is required when its parent command is invoked.

(Inherited from Option)
Validators

Validators that will be called when the option is matched by the parser.

(Inherited from Option)
ValueType

Methods

GetCompletions(CompletionContext)

Gets completions for the symbol.

(Inherited from Option)
GetDefaultValue()

Gets the default value for the option.

(Inherited from Option)
ToString()

Returns a string that represents the current object.

(Inherited from Symbol)

Applies to