Class OptionAttributeBase
- Namespace
- McMaster.Extensions.CommandLineUtils
- Assembly
- McMaster.Extensions.CommandLineUtils.dll
Common option properties.
public abstract class OptionAttributeBase : Attribute
- Inheritance
-
objectAttributeOptionAttributeBase
- Derived
Properties
Description
A description of this option to show in generated help text.
public string? Description { get; set; }
Property Value
- See Also
Inherited
Determines if subcommands added to Commands should also have access to this option.
public bool Inherited { get; set; }
Property Value
- See Also
LongName
The long command line flag used to identify this option. On command line, this is preceeded by a double dash: '--{LongName}'.
public string? LongName { get; set; }
Property Value
ShortName
The short command line flag used to identify this option. On command line, this is preceeded by a single '-{ShortName}'.
public string? ShortName { get; set; }
Property Value
ShowInHelpText
Determines if this option should be shown in generated help text.
public bool ShowInHelpText { get; set; }
Property Value
- See Also
SymbolName
Can be used in addition to ShortName to add a single, non-English character. Example "-?".
public string? SymbolName { get; set; }
Property Value
Template
The option template. This is parsed into the short and long name.
public string? Template { get; set; }
Property Value
ValueName
The name of value(s) shown in help text when OptionType is not NoValue.
public string? ValueName { get; set; }