UsageWriterWriteAliases Method

Writes the aliases of an argument for use in the argument description list.

Definition

Namespace: Ookii.CommandLine
Assembly: Ookii.CommandLine (in Ookii.CommandLine.dll) Version: 4.2.0+a4d3631e4dcc0970081ed435288efdebc1325f83
C#
protected virtual void WriteAliases(
	IEnumerable<string>? aliases,
	IEnumerable<char>? shortAliases,
	string prefix,
	string shortPrefix
)

Parameters

aliases  IEnumerableString
The aliases of an argument, or the long aliases for ParsingModeLongShort mode, or if the argument has no (long) aliases.
shortAliases  IEnumerableChar
The short aliases of an argument, or if the argument has no short aliases.
prefix  String
The argument name prefix to use for the aliases.
shortPrefix  String
The argument name prefix to use for the shortAliases.

Remarks

The base implementation writes a list of the short aliases, followed by the long aliases, surrounded by parentheses, and preceded by a single space. For example, " (-Alias1, -Alias2)" or " (-a, -b, --alias1, --alias2)".

If there are no aliases at all, it writes nothing.

This method is called by the base implementation of the WriteArgumentDescription(CommandLineArgument) method if the IncludeAliasInDescription property is .

See Also