UsageWriterGetCommandListUsage Method

Returns a string with usage help for the specified command manager.

Definition

Namespace: Ookii.CommandLine
Assembly: Ookii.CommandLine (in Ookii.CommandLine.dll) Version: 4.0.0+bb7ed9a8fdfd1cb21824750a8cf508863ad15086
C#
public string GetCommandListUsage(
	CommandManager manager,
	int maximumLineLength = 0
)

Parameters

manager  CommandManager
The CommandManager.
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

The usage help will contain a list of all available commands.

This method ignores the writer passed to the UsageWriter(LineWrappingTextWriter, NullableBoolean) constructor, and will use the LineWrappingTextWriterForStringWriter(Int32, IFormatProvider, Boolean) method instead, and returns the resulting string. If color support was not explicitly enabled, it will be disabled.

This method calls the WriteCommandListUsageCore method to create the usage help text.

Exceptions

See Also