C# Класс GitSharp.CLI.TextBuiltin

Abstract command which can be invoked from the command line. Commands are configured with a single "current" repository and then the execute(String[]) method is invoked with the arguments that appear after the subcommand. Command constructors should perform as little work as possible as they may be invoked very early during process loading, and the command may not execute even though it was constructed.
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
arguments List
options CmdParserOptionSet

Защищенные свойства (Protected)

Свойство Тип Описание
argWalk GitSharp.Core.RevWalk.RevWalk

Открытые методы

Метод Описание
Execute ( String args ) : void

Parses the command line and runs the corresponding subcommand

GetCommand ( ) : Command

Returns the current command for lightweight referencing.

Init ( Core repo, DirectoryInfo path ) : void

Initializes a command for use including the repository and output support.

OnlineHelp ( ) : void

Opens the default webbrowser to display the command specific help.

ParseOptions ( string args ) : List

Parses the options for all subcommands and executes the corresponding code for each option.

Run ( String args ) : void

Provides an abstract layer to perform the action of this command. This method should only be invoked by the Execute(String[] args) method.

getCommandHelp ( ) : string

Used by CommandRef to get the command help website during initial creation.

getCommandName ( ) : string

Used by CommandRef to get the command name during initial creation.

Защищенные методы

Метод Описание
die ( String why ) : Die

Generic method used to return an exception during fatal conditions.

Приватные методы

Метод Описание
Resolve ( string s ) : GitSharp.ObjectId

Описание методов

Execute() публичный Метод

Parses the command line and runs the corresponding subcommand
public Execute ( String args ) : void
args String Specifies the command line arguments passed after the command name.
Результат void

GetCommand() публичный Метод

Returns the current command for lightweight referencing.
public GetCommand ( ) : Command
Результат Command

Init() публичный Метод

Initializes a command for use including the repository and output support.
public Init ( Core repo, DirectoryInfo path ) : void
repo Core Specifies the repository to use.
path System.IO.DirectoryInfo
Результат void

OnlineHelp() публичный Метод

Opens the default webbrowser to display the command specific help.
public OnlineHelp ( ) : void
Результат void

ParseOptions() публичный Метод

Parses the options for all subcommands and executes the corresponding code for each option.
public ParseOptions ( string args ) : List
args string Specifies the string from the options to the end of the command line.
Результат List

Run() публичный абстрактный Метод

Provides an abstract layer to perform the action of this command. This method should only be invoked by the Execute(String[] args) method.
public abstract Run ( String args ) : void
args String
Результат void

die() защищенный статический Метод

Generic method used to return an exception during fatal conditions.
protected static die ( String why ) : Die
why String Specifies the textual explanation of why the exception was thrown.
Результат Die

getCommandHelp() публичный Метод

Used by CommandRef to get the command help website during initial creation.
public getCommandHelp ( ) : string
Результат string

getCommandName() публичный Метод

Used by CommandRef to get the command name during initial creation.
public getCommandName ( ) : string
Результат string

Описание свойств

argWalk защищенное свойство

RevWalk used during command line parsing, if it was required.
protected RevWalk,GitSharp.Core.RevWalk argWalk
Результат GitSharp.Core.RevWalk.RevWalk

arguments публичное свойство

Contains the remaining arguments after the options listed in the command line.
public List arguments
Результат List

options публичное статическое свойство

Custom OptionSet to allow special option handling rules such as --option dir
public static CmdParserOptionSet,GitSharp.CLI options
Результат CmdParserOptionSet