Bewerken

Delen via


CommandLineBuilderExtensions.UseHelp Method

Definition

Overloads

UseHelp(CommandLineBuilder, Nullable<Int32>)

Configures the application to show help when one of the following options are specified on the command line:

-h
/h
--help
-?
/?
UseHelp(CommandLineBuilder, String[])

Configures the application to show help when one of the specified option aliases are used on the command line.

UseHelp(CommandLineBuilder, Action<HelpContext>, Nullable<Int32>)

Configures the application to show help when one of the specified option aliases are used on the command line.

UseHelp(CommandLineBuilder, Nullable<Int32>)

Configures the application to show help when one of the following options are specified on the command line:

-h
/h
--help
-?
/?
public static System.CommandLine.Builder.CommandLineBuilder UseHelp (this System.CommandLine.Builder.CommandLineBuilder builder, int? maxWidth = default);
static member UseHelp : System.CommandLine.Builder.CommandLineBuilder * Nullable<int> -> System.CommandLine.Builder.CommandLineBuilder
<Extension()>
Public Function UseHelp (builder As CommandLineBuilder, Optional maxWidth As Nullable(Of Integer) = Nothing) As CommandLineBuilder

Parameters

builder
CommandLineBuilder

A command line builder.

maxWidth
Nullable<Int32>

Maximum output width for default help builder.

Returns

The same instance of CommandLineBuilder.

Applies to

UseHelp(CommandLineBuilder, String[])

Configures the application to show help when one of the specified option aliases are used on the command line.

public:
[System::Runtime::CompilerServices::Extension]
 static System::CommandLine::Builder::CommandLineBuilder ^ UseHelp(System::CommandLine::Builder::CommandLineBuilder ^ builder, ... cli::array <System::String ^> ^ helpAliases);
public static System.CommandLine.Builder.CommandLineBuilder UseHelp (this System.CommandLine.Builder.CommandLineBuilder builder, params string[] helpAliases);
static member UseHelp : System.CommandLine.Builder.CommandLineBuilder * string[] -> System.CommandLine.Builder.CommandLineBuilder
<Extension()>
Public Function UseHelp (builder As CommandLineBuilder, ParamArray helpAliases As String()) As CommandLineBuilder

Parameters

builder
CommandLineBuilder

A command line builder.

helpAliases
String[]

The set of aliases that can be specified on the command line to request help.

Returns

The same instance of CommandLineBuilder.

Remarks

The specified aliases will override the default values.

Applies to

UseHelp(CommandLineBuilder, Action<HelpContext>, Nullable<Int32>)

Configures the application to show help when one of the specified option aliases are used on the command line.

public static System.CommandLine.Builder.CommandLineBuilder UseHelp (this System.CommandLine.Builder.CommandLineBuilder builder, Action<System.CommandLine.Help.HelpContext> customize, int? maxWidth = default);
static member UseHelp : System.CommandLine.Builder.CommandLineBuilder * Action<System.CommandLine.Help.HelpContext> * Nullable<int> -> System.CommandLine.Builder.CommandLineBuilder
<Extension()>
Public Function UseHelp (builder As CommandLineBuilder, customize As Action(Of HelpContext), Optional maxWidth As Nullable(Of Integer) = Nothing) As CommandLineBuilder

Parameters

builder
CommandLineBuilder

A command line builder.

customize
Action<HelpContext>

A delegate that will be called to customize help if help is requested.

maxWidth
Nullable<Int32>

Maximum output width for default help builder.

Returns

The same instance of CommandLineBuilder.

Remarks

The specified aliases will override the default values.

Applies to