Click or drag to resize

ShellCommandWriteAssemblyCommandListToConsole Method

Writes a list of all the shell commands in the specified assembly to the standard output stream.

Namespace:  Ookii.CommandLine
Assembly:  Ookii.CommandLine (in Ookii.CommandLine.dll) Version: 2.3.0
Syntax
public static void WriteAssemblyCommandListToConsole(
	Assembly assembly
)

Parameters

assembly
Type: System.ReflectionAssembly
The assembly that contains the shell commands.
Exceptions
ExceptionCondition
ArgumentNullExceptionassembly is .
Remarks

This method writes a list of all shell command names and their descriptions to the standard output stream, wrapping the lines to fit on the console automatically.

A command's name is retrieved from its ShellCommandAttribute attribute, and the description is retrieved from its DescriptionAttribute attribute.

Line wrapping at word boundaries is applied to the output, wrapping at the console's window width. When the console output is redirected to a file, Microsoft .Net will still report the console's actual window width, but on Mono the value of the WindowWidth property will be 0. In that case, the usage information will not be wrapped.

This method indents additional lines for the command descriptions, unless the WindowWidth property is less than 31.

See Also