Class CommandAttribute
Add this attribute to a class to indicate that the class contains a command that is runnable through the commands framework. This attribute provides information about the command name, whether it uses async execution, and optionally the human readable description.
Inherited Members
Namespace: Benday.CommandsFramework
Assembly: Benday.CommandsFramework.dll
Syntax
[AttributeUsage(AttributeTargets.Class)]
public class CommandAttribute : Attribute
Properties
| Edit this page View SourceAliases
Alternate names that can be used on the command line in place of Name. This is useful for providing a short form of a long command name, for example 'mc' as an alias for 'my-super-long-command-name'. Aliases are resolved to the real command name before the command runs, so the rest of the framework only ever sees Name. Real command names always take precedence over aliases.
Declaration
public string[] Aliases { get; set; }
Property Value
| Type | Description |
|---|---|
| string[] |
Category
Category for the command. This is used to group commands together in the help output.
Declaration
public string Category { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Description
Human readable description of the command.
Declaration
public string Description { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
IsAsync
True if this command should be run in async mode
Declaration
public bool IsAsync { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Name
Name of command. This is the command argument (arg[0]) from the command line. This value is used to locate the command to be instantiated and run.
Declaration
public string Name { get; set; }
Property Value
| Type | Description |
|---|---|
| string |