CliHelpBuilder Class
Definition
- Namespace
- DotMake.CommandLine
- Assembly
- DotMake.CommandLine.dll
Formats output to be shown to users to describe how to use a command line tool.
HelpBuilder is weirdly designed, i.e. it's hard to derive from that class due to static methods. CliHelpBuilder solves this problem by providing overridable methods, and it also adds color support.
public class CliHelpBuilder : HelpBuilder
- Inheritance
-
CliHelpBuilder
Constructors
| CliHelpBuilder(CliTheme, int) |
Initializes a new instance of the CliHelpBuilder class. |
Properties
| MaxWidth |
The maximum width for which to format help output. (Inherited from HelpBuilder) |
| Theme |
Gets the theme used by this CliHelpBuilder. |
Methods
| CustomizeLayout(Func<HelpContext, IEnumerable<Func<HelpContext, bool>>>) |
Customizes the layout of the help output. |
| GetLayout(HelpContext) |
Gets the default sections to be written for command line help. |
| GetTwoColumnRow(Symbol, HelpContext) |
Gets a help item for the specified symbol. |
| Write(HelpContext) |
Writes help output for the specified command. |
| WriteAdditionalArgumentsSection(HelpContext) |
Writes a help section describing a command's additional arguments, typically shown only when TreatUnmatchedTokensAsErrors is set to true. |
| WriteColumns(IReadOnlyList<TwoColumnHelpRow>, HelpContext) |
Writes the specified help rows, aligning output in columns. |
| WriteCommandArgumentsSection(HelpContext) |
Writes a help section describing a command's arguments. Similar to:
|
| WriteCommandOptionsSection(HelpContext) |
Writes a help section describing a command's options. Similar to:
|
| WriteCommandUsageSection(HelpContext) |
Writes a help section describing a command's usage. Similar to:
|
| WriteSubcommandsSection(HelpContext) |
Writes a help section describing a command's subcommands. Similar to:
|
| WriteSynopsisSection(HelpContext) |
Writes a help section describing a command's synopsis. Similar to:
|