Models a base attribute to define command line syntax.
More...
|
bool | Required [get, set] |
| Gets or sets a value indicating whether a command line option is required.
|
|
int | Min [get, set] |
| When applied to System.Collections.Generic.IEnumerable<T> properties defines the lower range of items.
|
|
int | Max [get, set] |
| When applied to System.Collections.Generic.IEnumerable<T> properties defines the upper range of items.
|
|
object | Default [get, set] |
| Gets or sets mapped property default value.
|
|
string | HelpText [get, set] |
| Gets or sets a short description of this command line option. Usually a sentence summary.
|
|
string | MetaValue [get, set] |
| Gets or sets mapped property meta value. Usually an uppercase hint of required value type.
|
|
bool | Hidden [get, set] |
| Gets or sets a value indicating whether a command line option is visible in the help text.
|
|
Type | ResourceType [get, set] |
| Gets or sets the System.Type that contains the resources for HelpText.
|
|
Models a base attribute to define command line syntax.
Definition at line 12 of file BaseAttribute.cs.
◆ BaseAttribute()
CommandLine.BaseAttribute.BaseAttribute |
( |
| ) |
|
|
package |
Initializes a new instance of the CommandLine.BaseAttribute class.
Definition at line 23 of file BaseAttribute.cs.
24 {
30 }
readonly LocalizableAttributeProperty helpText
string HelpText
Gets or sets a short description of this command line option. Usually a sentence summary.
◆ helpText
◆ max
int CommandLine.BaseAttribute.max |
|
private |
◆ metaValue
string CommandLine.BaseAttribute.metaValue |
|
private |
◆ min
int CommandLine.BaseAttribute.min |
|
private |
◆ resourceType
Type CommandLine.BaseAttribute.resourceType |
|
private |
◆ Default
object CommandLine.BaseAttribute.Default |
|
getset |
Gets or sets mapped property default value.
Definition at line 78 of file BaseAttribute.cs.
◆ HelpText
string CommandLine.BaseAttribute.HelpText |
|
getset |
Gets or sets a short description of this command line option. Usually a sentence summary.
Definition at line 83 of file BaseAttribute.cs.
84 {
85 get => helpText.Value ?? string.Empty;
86 set => helpText.Value = value ?? throw new ArgumentNullException("value");
87 }
◆ Hidden
bool CommandLine.BaseAttribute.Hidden |
|
getset |
Gets or sets a value indicating whether a command line option is visible in the help text.
Definition at line 109 of file BaseAttribute.cs.
◆ Max
int CommandLine.BaseAttribute.Max |
|
getset |
When applied to System.Collections.Generic.IEnumerable<T> properties defines the upper range of items.
If not set, no upper range is enforced.
Definition at line 61 of file BaseAttribute.cs.
62 {
64 set
65 {
66 if (value < 0)
67 {
68 throw new ArgumentNullException("value");
69 }
70
72 }
73 }
◆ MetaValue
string CommandLine.BaseAttribute.MetaValue |
|
getset |
Gets or sets mapped property meta value. Usually an uppercase hint of required value type.
Definition at line 92 of file BaseAttribute.cs.
93 {
95 set
96 {
97 if (value == null)
98 {
99 throw new ArgumentNullException("value");
100 }
101
103 }
104 }
◆ Min
int CommandLine.BaseAttribute.Min |
|
getset |
When applied to System.Collections.Generic.IEnumerable<T> properties defines the lower range of items.
If not set, no lower range is enforced.
Definition at line 42 of file BaseAttribute.cs.
43 {
45 set
46 {
47 if (value < 0)
48 {
49 throw new ArgumentNullException("value");
50 }
51
53 }
54 }
◆ Required
bool CommandLine.BaseAttribute.Required |
|
getset |
Gets or sets a value indicating whether a command line option is required.
Definition at line 35 of file BaseAttribute.cs.
◆ ResourceType
Type CommandLine.BaseAttribute.ResourceType |
|
getset |
Gets or sets the System.Type that contains the resources for HelpText.
Definition at line 114 of file BaseAttribute.cs.
115 {
118 helpText.ResourceType = value;
119 }
The documentation for this class was generated from the following file: