UsageWriterWriteParserUsage Method

Creates usage help for the specified parser.

Definition

Namespace: Ookii.CommandLine
Assembly: Ookii.CommandLine (in Ookii.CommandLine.dll) Version: 4.0.0+bb7ed9a8fdfd1cb21824750a8cf508863ad15086
C#
public void WriteParserUsage(
	CommandLineParser parser,
	UsageHelpRequest request = UsageHelpRequest.Full
)

Parameters

parser  CommandLineParser
The CommandLineParser.
request  UsageHelpRequest  (Optional)
The parts of usage to write.

Remarks

If no writer was passed to the UsageWriter(LineWrappingTextWriter, NullableBoolean) 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 WriteParserUsageCore(UsageHelpRequest) method to create the usage help text.

Exceptions

See Also