Class CommandDescriptor
The CommandDescriptor defines the command identity and its supported options that an end-user or an application can use. You can also describe the command behavior, such as whether the command is a root, grouped, or subcommand.
public sealed class CommandDescriptor
- Inheritance
-
CommandDescriptor
- Inherited Members
Constructors
CommandDescriptor(string, string, string, CommandType, CommandFlags, OwnerIdCollection?, ArgumentDescriptors?, OptionDescriptors?, TagIdCollection?, Dictionary<string, object>?)
Initializes a new instance.
public CommandDescriptor(string id, string name, string description, CommandType type, CommandFlags flags, OwnerIdCollection? owners = null, ArgumentDescriptors? argumentDescriptors = null, OptionDescriptors? optionDescriptors = null, TagIdCollection? tagIds = null, Dictionary<string, object>? customProperties = null)
Parameters
idstringThe command id.
namestringThe command name.
descriptionstringThe command description.
typeCommandTypeThe command type.
flagsCommandFlagsThe command flags.
ownersOwnerIdCollectionThe command owners.
argumentDescriptorsArgumentDescriptorsThe argument descriptors.
optionDescriptorsOptionDescriptorsThe option descriptors.
tagIdsTagIdCollectionThe tag identifiers.
customPropertiesDictionary<string, object>The custom properties.
Properties
ArgumentDescriptors
The command argument descriptors.
public ArgumentDescriptors? ArgumentDescriptors { get; }
Property Value
Checker
The command checker.
public Type? Checker { get; }
Property Value
CustomProperties
The custom properties.
public Dictionary<string, object>? CustomProperties { get; }
Property Value
Description
The command description.
public string Description { get; }
Property Value
Flags
The command flags.
public CommandFlags Flags { get; }
Property Value
Id
The command id.
public string Id { get; }
Property Value
Remarks
The command id is unique across all commands within a group or a root.
Name
The command display name.
public string Name { get; }
Property Value
OptionDescriptors
The command option descriptors.
public OptionDescriptors? OptionDescriptors { get; }
Property Value
OwnerIds
The command owner identifiers.
public OwnerIdCollection? OwnerIds { get; }
Property Value
Remarks
The root command will not have any owner.
Runner
The command runner.
public Type? Runner { get; }
Property Value
TagIds
The tags to find the command.
public TagIdCollection? TagIds { get; }
Property Value
Type
The command type.
public CommandType Type { get; }