Table of Contents

Class OptionAttributeBase

Namespace
McMaster.Extensions.CommandLineUtils
Assembly
McMaster.Extensions.CommandLineUtils.dll

Common option properties.

public abstract class OptionAttributeBase : Attribute
Inheritance
object
Attribute
OptionAttributeBase
Derived

Properties

Description

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

public string? Description { get; set; }

Property Value

string
See Also

Inherited

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

public bool Inherited { get; set; }

Property Value

bool
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

string

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

string

ShowInHelpText

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

public bool ShowInHelpText { get; set; }

Property Value

bool
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

string

Template

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

public string? Template { get; set; }

Property Value

string

ValueName

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

public string? ValueName { get; set; }

Property Value

string