CommandOptionAttribute Class
An attribute representing a command option.
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
public sealed class CommandOptionAttribute : Attribute
- Namespace
- Spectre
.Console .Cli - Base Types
-
- Attribute
Attributes
-
Attribute
Usage Attribute
Constructors
-
Command
Option Attribute (string) -
Initializes a new instance of the
CommandOptionAttribute
class.
Properties
- bool IsHidden
- Gets or sets a value indicating whether this option is hidden from the help text.
- IReadOnlyList<string> LongNames
- Gets the long names of the option.
- IReadOnlyList<string> ShortNames
- Gets the short names of the option.
- bool ValueIsOptional
- Gets a value indicating whether the value is optional.
- string ValueName
- Gets the value name of the option.