UsageWriterGetParserAmbiguousPrefixAliasUsage Method

Returns a string with usage help for when the user used an argument name that was a prefix alias for multiple arguments.

Definition

Namespace: Ookii.CommandLine
Assembly: Ookii.CommandLine (in Ookii.CommandLine.dll) Version: 5.0.0+724ca9b7fa5edc075ec2ae65044e61b0d494fd1c
C#
public string GetParserAmbiguousPrefixAliasUsage(
	CommandLineParser parser,
	IEnumerable<string> possibleMatches,
	int maximumLineLength = 0
)

Parameters

parser  CommandLineParser
The CommandLineParser.
possibleMatches  IEnumerableString
The list of possible argument names or aliases.
maximumLineLength  Int32  (Optional)
The length at which to white-space wrap lines in the output, or 0 to disable wrapping.

Return Value

String
A string containing the usage help.

Remarks

If no writer was passed to the UsageWriter(LineWrappingTextWriter, TriState) constructor, this method will create a LineWrappingTextWriter for the standard output stream. If color usage wasn't explicitly enabled, it will be enabled if the output supports it according to VirtualTerminalEnableColor(StandardStream).

This method calls the WriteParserAmbiguousPrefixAliasUsageCore(IEnumerableString) method to create the usage help text.

Exceptions

ArgumentNullExceptionparser or possibleMatches is .

See Also