Class OptionDescriptorAttribute
- Namespace
- OneImlx.Terminal.Commands.Declarative
- Assembly
- OneImlx.Terminal.dll
Declares an OptionDescriptor for a command.
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = false)]
public sealed class OptionDescriptorAttribute : Attribute
- Inheritance
-
OptionDescriptorAttribute
- Inherited Members
Constructors
OptionDescriptorAttribute(string, string, string, OptionFlags, string?)
Initializes a new instance.
public OptionDescriptorAttribute(string id, string dataType, string description, OptionFlags flags, string? alias = null)
Parameters
id
stringThe option id.
dataType
stringThe option data type.
description
stringThe option description.
flags
OptionFlagsThe option flags.
alias
stringThe option alias.
Properties
Alias
The option alias.
public string? Alias { get; }
Property Value
Remarks
The option alias is unique within a command. Option alias supports the legacy apps that identified a command option with an id and an alias string. For modern console apps, we recommend using just an option identifier. The core data model is optimized to work with option id. In general, an app should not identify the same option with multiple strings.
DataType
The option data type.
public string DataType { get; }
Property Value
Description
The option description.
public string Description { get; }
Property Value
Remarks
The option id is unique across all commands.
Flags
The option flags.
public OptionFlags Flags { get; }
Property Value
Id
The option id.
public string Id { get; }
Property Value
Remarks
The option id is unique within a command.