Search Results for

    Show / Hide Table of Contents

    Class BaseHelpFormatter

    Represents a base class for all default help formatters.

    Inheritance
    System.Object
    BaseHelpFormatter
    DefaultHelpFormatter
    Namespace: DisCatSharp.CommandsNext.Converters
    Assembly: DisCatSharp.CommandsNext.dll
    Syntax
    public abstract class BaseHelpFormatter

    Constructors

    | Improve this Doc View Source

    BaseHelpFormatter(CommandContext)

    Creates a new help formatter for specified CommandsNext extension instance.

    Declaration
    public BaseHelpFormatter(CommandContext ctx)
    Parameters
    Type Name Description
    CommandContext ctx

    Context in which this formatter is being invoked.

    Properties

    | Improve this Doc View Source

    CommandsNext

    Gets the CommandsNext extension which constructed this help formatter.

    Declaration
    protected CommandsNextExtension CommandsNext { get; }
    Property Value
    Type Description
    CommandsNextExtension
    | Improve this Doc View Source

    Context

    Gets the context in which this formatter is being invoked.

    Declaration
    protected CommandContext Context { get; }
    Property Value
    Type Description
    CommandContext

    Methods

    | Improve this Doc View Source

    Build()

    Constructs the help message.

    Declaration
    public abstract CommandHelpMessage Build()
    Returns
    Type Description
    CommandHelpMessage

    Data for the help message.

    | Improve this Doc View Source

    WithCommand(Command)

    Sets the command this help message will be for.

    Declaration
    public abstract BaseHelpFormatter WithCommand(Command command)
    Parameters
    Type Name Description
    Command command

    Command for which the help message is being produced.

    Returns
    Type Description
    BaseHelpFormatter

    This help formatter.

    | Improve this Doc View Source

    WithSubcommands(IEnumerable<Command>)

    Sets the subcommands for this command, if applicable. This method will be called with filtered data.

    Declaration
    public abstract BaseHelpFormatter WithSubcommands(IEnumerable<Command> subcommands)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<Command> subcommands

    Subcommands for this command group.

    Returns
    Type Description
    BaseHelpFormatter

    This help formatter.

    Extension Methods

    ReflectionUtilities.ToDictionary<T>(T)
    • Improve this Doc
    • View Source
    In This Article
    Back to top © 2021-2022 Aiko IT Systems