Search Results for

    Show / Hide Table of Contents

    Class DefaultHelpTextGenerator

    A default implementation of help text generation.

    Inheritance
    System.Object
    DefaultHelpTextGenerator
    Implements
    IHelpTextGenerator
    Namespace: McMaster.Extensions.CommandLineUtils.HelpText
    Assembly: McMaster.Extensions.CommandLineUtils.dll
    Syntax
    public class DefaultHelpTextGenerator : IHelpTextGenerator

    Constructors

    | Improve this Doc View Source

    DefaultHelpTextGenerator()

    Initializes a new instance of DefaultHelpTextGenerator.

    Declaration
    protected DefaultHelpTextGenerator()

    Properties

    | Improve this Doc View Source

    Singleton

    A singleton instance of DefaultHelpTextGenerator.

    Declaration
    public static DefaultHelpTextGenerator Singleton { get; }
    Property Value
    Type Description
    DefaultHelpTextGenerator

    Methods

    | Improve this Doc View Source

    Generate(CommandLineApplication, TextWriter)

    Generate help text for the application.

    Declaration
    public virtual void Generate(CommandLineApplication application, TextWriter output)
    Parameters
    Type Name Description
    CommandLineApplication application
    System.IO.TextWriter output
    | Improve this Doc View Source

    GenerateArguments(CommandLineApplication, TextWriter, IReadOnlyList<CommandArgument>, Int32)

    Generate the lines that show information about arguments

    Declaration
    protected virtual void GenerateArguments(CommandLineApplication application, TextWriter output, IReadOnlyList<CommandArgument> visibleArguments, int firstColumnWidth)
    Parameters
    Type Name Description
    CommandLineApplication application

    The app

    System.IO.TextWriter output

    Help text output

    System.Collections.Generic.IReadOnlyList<CommandArgument> visibleArguments

    Arguments not hidden from help text

    System.Int32 firstColumnWidth

    The width of the first column of commands, arguments, and options

    | Improve this Doc View Source

    GenerateBody(CommandLineApplication, TextWriter)

    Generate detailed help information

    Declaration
    protected virtual void GenerateBody(CommandLineApplication application, TextWriter output)
    Parameters
    Type Name Description
    CommandLineApplication application

    The application

    System.IO.TextWriter output

    Help text output

    | Improve this Doc View Source

    GenerateCommands(CommandLineApplication, TextWriter, IReadOnlyList<CommandLineApplication>, Int32)

    Generate the lines that show information about subcommands

    Declaration
    protected virtual void GenerateCommands(CommandLineApplication application, TextWriter output, IReadOnlyList<CommandLineApplication> visibleCommands, int firstColumnWidth)
    Parameters
    Type Name Description
    CommandLineApplication application

    The app

    System.IO.TextWriter output

    Help text output

    System.Collections.Generic.IReadOnlyList<CommandLineApplication> visibleCommands

    Commands not hidden from help text

    System.Int32 firstColumnWidth

    The width of the first column of commands, arguments, and options

    | Improve this Doc View Source

    GenerateFooter(CommandLineApplication, TextWriter)

    Generate the last lines of help text output

    Declaration
    protected virtual void GenerateFooter(CommandLineApplication application, TextWriter output)
    Parameters
    Type Name Description
    CommandLineApplication application

    The app

    System.IO.TextWriter output

    Help text output

    | Improve this Doc View Source

    GenerateHeader(CommandLineApplication, TextWriter)

    Generate the first few lines of help output text

    Declaration
    protected virtual void GenerateHeader(CommandLineApplication application, TextWriter output)
    Parameters
    Type Name Description
    CommandLineApplication application

    The app

    System.IO.TextWriter output

    Help text output

    | Improve this Doc View Source

    GenerateOptions(CommandLineApplication, TextWriter, IReadOnlyList<CommandOption>, Int32)

    Generate the lines that show information about options

    Declaration
    protected virtual void GenerateOptions(CommandLineApplication application, TextWriter output, IReadOnlyList<CommandOption> visibleOptions, int firstColumnWidth)
    Parameters
    Type Name Description
    CommandLineApplication application

    The app

    System.IO.TextWriter output

    Help text output

    System.Collections.Generic.IReadOnlyList<CommandOption> visibleOptions

    Options not hidden from help text

    System.Int32 firstColumnWidth

    The width of the first column of commands, arguments, and options

    | Improve this Doc View Source

    GenerateUsage(CommandLineApplication, TextWriter, IReadOnlyList<CommandArgument>, IReadOnlyList<CommandOption>, IReadOnlyList<CommandLineApplication>)

    Generate the line that shows usage

    Declaration
    protected virtual void GenerateUsage(CommandLineApplication application, TextWriter output, IReadOnlyList<CommandArgument> visibleArguments, IReadOnlyList<CommandOption> visibleOptions, IReadOnlyList<CommandLineApplication> visibleCommands)
    Parameters
    Type Name Description
    CommandLineApplication application

    The app

    System.IO.TextWriter output

    Help text output

    System.Collections.Generic.IReadOnlyList<CommandArgument> visibleArguments

    Arguments not hidden from help text

    System.Collections.Generic.IReadOnlyList<CommandOption> visibleOptions

    Options not hidden from help text

    System.Collections.Generic.IReadOnlyList<CommandLineApplication> visibleCommands

    Commands not hidden from help text

    Implements

    IHelpTextGenerator
    • Improve this Doc
    • View Source
    In This Article
    Back to top