C# Class Sep.Git.Tfs.Core.GitHelpers

Inheritance: IGitHelpers
Afficher le fichier Open project: pmiossec/git-tfs Class Usage Examples

Méthodes publiques

Méthode Description
Command ( ) : string

Runs the given git command, and returns the contents of its STDOUT.

CommandInputOutputPipe ( TextReader>.Action interact ) : void
CommandInputPipe ( Action action ) : void
CommandNoisy ( ) : void

Runs the given git command, and passes STDOUT through to the current process's STDOUT.

CommandOneline ( ) : string

Runs the given git command, and returns the first line of its STDOUT.

CommandOutputPipe ( ) : TextReader

Runs the given git command, and returns a reader for STDOUT. NOTE: The returned value MUST be disposed!

CommandOutputPipe ( Action handleOutput ) : void

Runs the given git command, and redirects STDOUT to the provided action.

GitHelpers ( IContainer container ) : System
MakeRepository ( string dir ) : IGitRepository
WrapGitCommandErrors ( string exceptionMessage, System.Action action ) : void

WrapGitCommandErrors the actions, and if there are any git exceptions, rethrow a new exception with the given message.

Méthodes protégées

Méthode Description
Start ( string command, Action initialize ) : GitProcess

Private Methods

Méthode Description
AssertValidCommand ( string command ) : void
Close ( GitProcess process ) : void
RedirectStderr ( ProcessStartInfo startInfo ) : void
RedirectStdin ( ProcessStartInfo startInfo ) : void
RedirectStdout ( ProcessStartInfo startInfo ) : void
Start ( string command ) : GitProcess
Time ( string command, System.Action action ) : void

Method Details

Command() public méthode

Runs the given git command, and returns the contents of its STDOUT.
public Command ( ) : string
Résultat string

CommandInputOutputPipe() public méthode

public CommandInputOutputPipe ( TextReader>.Action interact ) : void
interact TextReader>.Action
Résultat void

CommandInputPipe() public méthode

public CommandInputPipe ( Action action ) : void
action Action
Résultat void

CommandNoisy() public méthode

Runs the given git command, and passes STDOUT through to the current process's STDOUT.
public CommandNoisy ( ) : void
Résultat void

CommandOneline() public méthode

Runs the given git command, and returns the first line of its STDOUT.
public CommandOneline ( ) : string
Résultat string

CommandOutputPipe() public méthode

Runs the given git command, and returns a reader for STDOUT. NOTE: The returned value MUST be disposed!
public CommandOutputPipe ( ) : TextReader
Résultat TextReader

CommandOutputPipe() public méthode

Runs the given git command, and redirects STDOUT to the provided action.
public CommandOutputPipe ( Action handleOutput ) : void
handleOutput Action
Résultat void

GitHelpers() public méthode

public GitHelpers ( IContainer container ) : System
container IContainer
Résultat System

MakeRepository() public méthode

public MakeRepository ( string dir ) : IGitRepository
dir string
Résultat IGitRepository

Start() protected méthode

protected Start ( string command, Action initialize ) : GitProcess
command string
initialize Action
Résultat GitProcess

WrapGitCommandErrors() public méthode

WrapGitCommandErrors the actions, and if there are any git exceptions, rethrow a new exception with the given message.
public WrapGitCommandErrors ( string exceptionMessage, System.Action action ) : void
exceptionMessage string A friendlier message to wrap the GitCommandException with. {0} is replaced with the command line and {1} is replaced with the exit code.
action System.Action
Résultat void