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.0.0+bb7ed9a8fdfd1cb21824750a8cf508863ad15086
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