ShellCommandWriteAssemblyCommandList Method (TextWriter, Assembly, String) |
Namespace: Ookii.CommandLine
public static void WriteAssemblyCommandList( TextWriter writer, Assembly assembly, string commandFormat )
Exception | Condition |
---|---|
ArgumentNullException | writer, assembly or commandFormat is . |
The commandFormat should have two placeholders, which are used for the command name and description respectively.
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 a LineWrappingTextWriter, the writer's indent will be reset before every command. It is recommended to set the Indent property to a value appropriate for your commandFormat.