Show / Hide Table of Contents

Class CommandDefinition

Describes the lexical structure of a command.

Inheritance
object
CommandDefinition
Implements
INoSerializationVerificationNeeded
Inherited Members
object.Equals(object, object)
object.GetType()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Petabridge.Cmd
Assembly: Petabridge.Cmd.Common.dll
Syntax
public sealed class CommandDefinition : INoSerializationVerificationNeeded

Constructors

CommandDefinition(string, string, IEnumerable<CommandArgument>)

Creates a new command definition.

Declaration
public CommandDefinition(string name, string description, IEnumerable<CommandArgument> arguments)
Parameters
Type Name Description
string name

The name of the command.

string description

The human-readable description of the command.

IEnumerable<CommandArgument> arguments

The arguments provided.

Properties

Arguments

Declaration
public IReadOnlyDictionary<string, CommandArgument> Arguments { get; }
Property Value
Type Description
IReadOnlyDictionary<string, CommandArgument>

ArgumentsByName

Declaration
public IReadOnlyDictionary<string, CommandArgument> ArgumentsByName { get; }
Property Value
Type Description
IReadOnlyDictionary<string, CommandArgument>

Description

Declaration
public string Description { get; }
Property Value
Type Description
string

Name

Declaration
public string Name { get; }
Property Value
Type Description
string

Type

Declaration
public CommandType Type { get; }
Property Value
Type Description
CommandType

Methods

Equals(object)

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
object obj
Returns
Type Description
bool
Overrides
object.Equals(object)

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
int
Overrides
object.GetHashCode()

Implements

INoSerializationVerificationNeeded

Extension Methods

ArgumentsExtractor.ExtractArgs(CommandDefinition, Command)
In this article
Back to top Generated by DocFX