C# Class GitSharp.CLI.CommandCatalog

List of all commands known by the command line tools. Commands are implementations of the TextBuiltin class, with a required command attribute to insert additional documentation and add some extra information such as if the command is common and completed. Commands may be registered by adding them to the Commands.xml file. The Commands.xml file should contain: a. The command name including namespace. b. The website address for command specific online help.(optional)
Show file Open project: stschake/GitSharp Class Usage Examples

Public Methods

Method Description
All ( ) : IList

Returns all known commands, sorted by command name.

CommandCatalog ( ) : System

Creates the command catalog from the Commands.xml file.

Common ( ) : List

Returns all common commands, sorted by command name.

Complete ( ) : List

Returns all complete commands, sorted by command name.

Get ( String name ) : CommandRef

Locates a single command by its user friendly name.

Incomplete ( ) : List

Returns all incomplete commands, sorted by command name.

Load ( String commandName, String commandHelp ) : void

Create and loads the command name into the command catalog.

StartsWith ( String s ) : List

Returns all commands starting with a specified string, sorted by command name.

Private Methods

Method Description
toSortedArray ( List c ) : List

Sorts a list of specified commands by command name.

Method Details

All() public method

Returns all known commands, sorted by command name.
public All ( ) : IList
return IList

CommandCatalog() public method

Creates the command catalog from the Commands.xml file.
public CommandCatalog ( ) : System
return System

Common() public method

Returns all common commands, sorted by command name.
public Common ( ) : List
return List

Complete() public method

Returns all complete commands, sorted by command name.
public Complete ( ) : List
return List

Get() public method

Locates a single command by its user friendly name.
public Get ( String name ) : CommandRef
name String Specifies the name of the command.
return CommandRef

Incomplete() public method

Returns all incomplete commands, sorted by command name.
public Incomplete ( ) : List
return List

Load() public method

Create and loads the command name into the command catalog.
public Load ( String commandName, String commandHelp ) : void
commandName String Specifies the command name to load.
commandHelp String Specifies the command's website for faster reference.
return void

StartsWith() public method

Returns all commands starting with a specified string, sorted by command name.
public StartsWith ( String s ) : List
s String
return List