Models a verb command specification.
More...
|
string | Name [get, private set] |
| Gets the verb name.
|
|
bool | Hidden [get, set] |
| Gets or sets a value indicating whether a command line verb is visible in the help text.
|
|
string | HelpText [get, set] |
| Gets or sets a short description of this command line option. Usually a sentence summary.
|
|
Type | ResourceType [get, set] |
| Gets or sets the System.Type that contains the resources for HelpText.
|
|
bool | IsDefault [get, private set] |
| Gets whether this verb is the default verb.
|
|
string[] | Aliases [get, private set] |
| Gets or sets the aliases.
|
|
Models a verb command specification.
Definition at line 14 of file VerbAttribute.cs.
◆ VerbAttribute()
CommandLine.VerbAttribute.VerbAttribute |
( |
string |
name, |
|
|
bool |
isDefault = false , |
|
|
string[] |
aliases = null |
|
) |
| |
Initializes a new instance of the CommandLine.VerbAttribute class.
- Parameters
-
name | The long name of the verb command. |
isDefault | Whether the verb is the default verb. |
aliases | aliases for this verb. i.e. "move" and "mv" |
- Exceptions
-
System.ArgumentException | Thrown if name is null, empty or whitespace and isDefault is false. |
Definition at line 29 of file VerbAttribute.cs.
30 {
31 if (string.IsNullOrWhiteSpace(name))
32 {
33 throw new ArgumentException("name");
34 }
35
40 Aliases = aliases ??
new string[0];
41 }
string HelpText
Gets or sets a short description of this command line option. Usually a sentence summary.
string Name
Gets the verb name.
string[] Aliases
Gets or sets the aliases.
readonly LocalizableAttributeProperty helpText
bool IsDefault
Gets whether this verb is the default verb.
◆ helpText
◆ resourceType
Type CommandLine.VerbAttribute.resourceType |
|
private |
◆ Aliases
string [] CommandLine.VerbAttribute.Aliases |
|
getprivate set |
◆ HelpText
string CommandLine.VerbAttribute.HelpText |
|
getset |
Gets or sets a short description of this command line option. Usually a sentence summary.
Definition at line 56 of file VerbAttribute.cs.
57 {
58 get => helpText.Value ?? string.Empty;
59 set => helpText.Value = value ?? throw new ArgumentNullException("value");
60 }
◆ Hidden
bool CommandLine.VerbAttribute.Hidden |
|
getset |
Gets or sets a value indicating whether a command line verb is visible in the help text.
Definition at line 51 of file VerbAttribute.cs.
◆ IsDefault
bool CommandLine.VerbAttribute.IsDefault |
|
getprivate set |
Gets whether this verb is the default verb.
Definition at line 74 of file VerbAttribute.cs.
◆ Name
string CommandLine.VerbAttribute.Name |
|
getprivate set |
◆ ResourceType
Type CommandLine.VerbAttribute.ResourceType |
|
getset |
Gets or sets the System.Type that contains the resources for HelpText.
Definition at line 65 of file VerbAttribute.cs.
The documentation for this class was generated from the following file: