C# Class Crabwise.CommandWrap.SyntaxBuilder

Builds a syntactical representation of a Command object.
Afficher le fichier Open project: CrabwiseStudios/CommandWrap Class Usage Examples

Méthodes publiques

Méthode Description
SyntaxBuilder ( Command command ) : System

Initializes a new instance of the SyntaxBuilder class.

ToString ( ) : string

Gets the complete syntax for the command.

The string returned by this method is equivalent to what would be entered in a command prompt.

Private Methods

Méthode Description
BuildCommandFromType ( Type commandType, Command command ) : void

Recursively builds the syntax for the command.

This method recursively works its way up a Command object's inheritance hierarchy. It stops when the next base class is not a subclass of Command. This allows for nested commands to be built.

BuildSyntax ( ) : void

Checks to make sure the provided Command has a CommandSyntaxAttribute and then calls SyntaxBuilder.BuildCommandFromType

GetSyntaxAttribute ( MemberInfo memberInfo ) : SyntaxAttribute

Gets a SyntaxAttribute from a member.

Method Details

SyntaxBuilder() public méthode

Initializes a new instance of the SyntaxBuilder class.
public SyntaxBuilder ( Command command ) : System
command Command Command from which to build the syntax.
Résultat System

ToString() public méthode

Gets the complete syntax for the command.
The string returned by this method is equivalent to what would be entered in a command prompt.
public ToString ( ) : string
Résultat string