C# Class Mercurial.CommandServerOutputDecoder

This class is responsible for decoding the output from the Mercurial instance running in Command Server mode.
Mostrar archivo Open project: TargetProcess/Target-Process-Plugins Class Usage Examples

Public Methods

Method Description
DecodeOneBlock ( StreamReader reader, char &type, string &content, int &exitCode ) : bool

Decodes one block of output from the reader.

GetOutput ( StreamReader reader, string &standardOutput, string &standardError, int &exitCode ) : bool

Retrieve the complete output from executing a command, as separate standard output, standard error and the exit code.

Private Methods

Method Description
DecodeInt32 ( StreamReader reader ) : int

Decodes and returns a single 32-bit integer from the StreamReader.

Note that this method will not check that reader is non-null.

DecodeString ( StreamReader reader ) : string

Decodes and returns a single string from the StreamReader.

Note that this method will not check that reader is non-null.

Method Details

DecodeOneBlock() public static method

Decodes one block of output from the reader.
/// is null. ///
public static DecodeOneBlock ( StreamReader reader, char &type, string &content, int &exitCode ) : bool
reader System.IO.StreamReader /// The to decode a block from. ///
type char /// Upon return from the method, if the method returns true, then /// this parameter contains the one-character type of the output, which is /// either 'o', 'e' or 'r'. ///
content string /// Upon return from the method, if the method returns true, then /// this parameter contains the decoded string content of the 'o' or 'e' type. ///
exitCode int /// Upon return from the method, if the method returns true, then /// this parameter contains the exit code of the command, for the 'r' type. ///
return bool

GetOutput() public static method

Retrieve the complete output from executing a command, as separate standard output, standard error and the exit code.
/// is null. ///
public static GetOutput ( StreamReader reader, string &standardOutput, string &standardError, int &exitCode ) : bool
reader System.IO.StreamReader /// The that output is read from. ///
standardOutput string /// Upon exit, if the method returns true, then this parameter has been /// changed to contain the standard output from executing the command. ///
standardError string /// Upon exit, if the method returns true, then this parameter has been /// changed to contain the standard error from executing the command. ///
exitCode int /// Upon exit, if the method returns true, then this parameter has been /// changed to contain the exit code from executing the command. ///
return bool