|
| Verb (string name, string helpText, bool hidden, bool isDefault, string[] aliases) |
|
Definition at line 10 of file Verb.cs.
◆ Verb()
CommandLine.Core.Verb.Verb |
( |
string |
name, |
|
|
string |
helpText, |
|
|
bool |
hidden, |
|
|
bool |
isDefault, |
|
|
string[] |
aliases |
|
) |
| |
Definition at line 12 of file Verb.cs.
13 {
14 if (string.IsNullOrWhiteSpace(name))
15 {
16 throw new ArgumentNullException(nameof(name));
17 }
18
20
21 HelpText = helpText ??
throw new ArgumentNullException(nameof(helpText));
24 Aliases = aliases ??
new string[0];
25 }
◆ FromAttribute()
Definition at line 37 of file Verb.cs.
38 {
39 return new Verb(attribute.Name,
40 attribute.HelpText,
41 attribute.Hidden,
42 attribute.IsDefault,
43 attribute.Aliases
44 );
45 }
Verb(string name, string helpText, bool hidden, bool isDefault, string[] aliases)
◆ SelectFromTypes()
static IEnumerable< Tuple< Verb, Type > > CommandLine.Core.Verb.SelectFromTypes |
( |
IEnumerable< Type > |
types | ) |
|
|
static |
Definition at line 47 of file Verb.cs.
48 {
49 return from type in types
50 let attrs = type.GetTypeInfo()
51 .GetCustomAttributes(typeof(VerbAttribute), true)
52 .ToArray()
53 where attrs.Length == 1
54 select Tuple.Create(
FromAttribute((VerbAttribute)attrs.Single()),
55 type
56 );
57 }
static Verb FromAttribute(VerbAttribute attribute)
◆ Aliases
string [] CommandLine.Core.Verb.Aliases |
|
getprivate set |
◆ HelpText
string CommandLine.Core.Verb.HelpText |
|
getprivate set |
◆ Hidden
bool CommandLine.Core.Verb.Hidden |
|
getprivate set |
◆ IsDefault
bool CommandLine.Core.Verb.IsDefault |
|
getprivate set |
◆ Name
string CommandLine.Core.Verb.Name |
|
getprivate set |
The documentation for this class was generated from the following file:
- deps/commandlineparser/src/CommandLine/Core/Verb.cs