public sealed class CommandAttribute : Attribute
Public NotInheritable Class CommandAttribute
Inherits Attribute
Dim instance As CommandAttribute
public ref class CommandAttribute sealed : public Attribute
To be considered a subcommand, a class must both implement the ICommand interface and have the CommandAttribute attribute applied. This allows classes that implement the ICommand interface, but do not have the attribute, to be used as common base classes for other commands, without being commands themselves.
If a command does not have an explicit name, its name is determined by taking the type name of the command class and applying the transformation specified by the CommandOptionsCommandNameTransform property.
Alternative names for a command can be given by using the AliasAttribute attribute.
CommandAttribute | Initializes a new instance of the CommandAttribute class using the target's type name as the command name. |
CommandAttribute(String) | Initializes a new instance of the CommandAttribute class using the specified command name. |
CommandName | Gets the name of the command, which can be used to invoke the command or to retrieve it using the CommandManagerGetCommand(String) method. |
IsHidden | Gets or sets a value that indicates whether the command is hidden from the usage help. |
TypeId | When implemented in a derived class, gets a unique identifier for this Attribute. (Inherited from Attribute) |
Equals | Returns a value that indicates whether this instance is equal to a specified object. (Inherited from Attribute) |
GetHashCode | Returns the hash code for this instance. (Inherited from Attribute) |
GetType | Gets the Type of the current instance. (Inherited from Object) |
IsDefaultAttribute | When overridden in a derived class, indicates whether the value of this instance is the default value for the derived class. (Inherited from Attribute) |
Match | When overridden in a derived class, returns a value that indicates whether this instance equals a specified object. (Inherited from Attribute) |
ToString | Returns a string that represents the current object. (Inherited from Object) |