Class CommandAttribute
Marks the execution information for a command.
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
public class CommandAttribute : Attribute
- Inheritance
-
CommandAttribute
- Inherited Members
Constructors
CommandAttribute()
Initializes a new instance of the Attribute class.
public CommandAttribute()
CommandAttribute(string)
Initializes a new CommandAttribute attribute with the specified name.
public CommandAttribute(string text)
Parameters
text
stringThe name of the command.
CommandAttribute(string, bool)
public CommandAttribute(string text, bool ignoreExtraArgs)
Parameters
CommandAttribute(string, bool, string, string[], string)
public CommandAttribute(string text, bool ignoreExtraArgs, string summary = null, string[] aliases = null, string remarks = null)
Parameters
Properties
Aliases
Marks the aliases for a command.
public string[] Aliases { get; set; }
Property Value
- string[]
Remarks
AliasAttribute extends the base value of this if present.
IgnoreExtraArgs
public bool? IgnoreExtraArgs { get; }
Property Value
- bool?
Remarks
Attaches remarks to your commands.
public string Remarks { get; set; }
Property Value
Remarks
RemainderAttribute overrides the value of this property if present.
RunMode
Specifies the RunMode of the command. This affects how the command is executed.
public RunMode RunMode { get; set; }
Property Value
Summary
Attaches a summary to your command.
public string Summary { get; set; }
Property Value
Remarks
Summary overrides the value of this property if present.
Text
Gets the text that has been set to be recognized as a command.
public string Text { get; }