Search Results for

    Show / Hide Table of Contents

    Class OptionAttributeBase

    Common option properties.

    Inheritance
    System.Object
    System.Attribute
    OptionAttributeBase
    HelpOptionAttribute
    OptionAttribute
    VersionOptionAttribute
    VersionOptionFromMemberAttribute
    Namespace: McMaster.Extensions.CommandLineUtils
    Assembly: McMaster.Extensions.CommandLineUtils.dll
    Syntax
    public abstract class OptionAttributeBase : Attribute

    Properties

    | Improve this Doc View Source

    Description

    A description of this option to show in generated help text.

    Declaration
    public string Description { get; set; }
    Property Value
    Type Description
    System.String
    See Also
    Description
    | Improve this Doc View Source

    Inherited

    Determines if subcommands added to Commands should also have access to this option.

    Declaration
    public bool Inherited { get; set; }
    Property Value
    Type Description
    System.Boolean
    See Also
    Inherited
    | Improve this Doc View Source

    LongName

    The long command line flag used to identify this option. On command line, this is preceeded by a double dash: '--{LongName}'.

    Declaration
    public string LongName { get; set; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    ShortName

    The short command line flag used to identify this option. On command line, this is preceeded by a single '-{ShortName}'.

    Declaration
    public string ShortName { get; set; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    ShowInHelpText

    Determines if this option should be shown in generated help text.

    Declaration
    public bool ShowInHelpText { get; set; }
    Property Value
    Type Description
    System.Boolean
    See Also
    ShowInHelpText
    | Improve this Doc View Source

    SymbolName

    Can be used in addition to ShortName to add a single, non-English character. Example "-?".

    Declaration
    public string SymbolName { get; set; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    Template

    The option template. This is parsed into the short and long name.

    Declaration
    public string Template { get; set; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    ValueName

    The name of value(s) shown in help text when OptionType is not NoValue.

    Declaration
    public string ValueName { get; set; }
    Property Value
    Type Description
    System.String
    • Improve this Doc
    • View Source
    In This Article
    Back to top