Click or drag to resize

ShellCommandWriteAssemblyCommandList Method (TextWriter, Assembly)

Writes a list of all the shell commands in the specified assembly to the specified TextWriter.

Namespace:  Ookii.CommandLine
Assembly:  Ookii.CommandLine (in Ookii.CommandLine.dll) Version: 2.3.0
Syntax
public static void WriteAssemblyCommandList(
	TextWriter writer,
	Assembly assembly
)

Parameters

writer
Type: System.IOTextWriter
The TextWriter to write the commands to.
assembly
Type: System.ReflectionAssembly
The assembly that contains the shell commands.
Exceptions
ExceptionCondition
ArgumentNullExceptionwriter or assembly is .
Remarks

This method writes a list of all shell command names and their descriptions to writer.

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

If writer is an instance of the LineWrappingTextWriter class, the Indent property will be set to a value appropriate for the formatting of the command list, and indenting will be reset before each command. Indenting will not be used if the MaximumLineLength is less than 30.

See Also