Table of Contents

Class CommandDescriptor

Namespace
OneImlx.Terminal.Commands
Assembly
OneImlx.Terminal.dll

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

id string

The command id.

name string

The command name.

description string

The command description.

type CommandType

The command type.

flags CommandFlags

The command flags.

owners OwnerIdCollection

The command owners.

argumentDescriptors ArgumentDescriptors

The argument descriptors.

optionDescriptors OptionDescriptors

The option descriptors.

tagIds TagIdCollection

The tag identifiers.

customProperties Dictionary<string, object>

The custom properties.

Properties

ArgumentDescriptors

The command argument descriptors.

public ArgumentDescriptors? ArgumentDescriptors { get; }

Property Value

ArgumentDescriptors

Checker

The command checker.

public Type? Checker { get; }

Property Value

Type

CustomProperties

The custom properties.

public Dictionary<string, object>? CustomProperties { get; }

Property Value

Dictionary<string, object>

Description

The command description.

public string Description { get; }

Property Value

string

Flags

The command flags.

public CommandFlags Flags { get; }

Property Value

CommandFlags

Id

The command id.

public string Id { get; }

Property Value

string

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

string

OptionDescriptors

The command option descriptors.

public OptionDescriptors? OptionDescriptors { get; }

Property Value

OptionDescriptors

OwnerIds

The command owner identifiers.

public OwnerIdCollection? OwnerIds { get; }

Property Value

OwnerIdCollection

Remarks

The root command will not have any owner.

Runner

The command runner.

public Type? Runner { get; }

Property Value

Type

TagIds

The tags to find the command.

public TagIdCollection? TagIds { get; }

Property Value

TagIdCollection

Type

The command type.

public CommandType Type { get; }

Property Value

CommandType

See Also