C# Class ToolBelt.Command

Class for running command line tools
ファイルを表示 Open project: jlyonsmith/ToolBelt

Public Methods

Method Description
Command ( string script, TextWriter outputWriter, TextWriter errorWriter, bool debugMode ) : System
Run ( ) : int
Run ( string programAndArgs ) : int

Run the specified command through the shell specified in the COMSPEC environment variable. Output is sent to the default console output and error streams.

Run ( string programAndArgs, TextWriter outputWriter, TextWriter errorWriter, bool debugMode ) : int

Run the specified command through the shell specified in the COMSPEC or SHELL environment variable.

Run ( string programAndArgs, string &output ) : int

Run the specified command through the shell specified in the COMSPEC environment variable.

Run ( string programAndArgs, string &output, bool debugMode ) : int
Run ( string programAndArgs, string &output, string &error ) : int

Run the specified command through the shell specified in the COMSPEC environment variable.

Private Methods

Method Description
CreateScriptFile ( string script ) : string

Method Details

Command() public method

public Command ( string script, TextWriter outputWriter, TextWriter errorWriter, bool debugMode ) : System
script string
outputWriter System.IO.TextWriter
errorWriter System.IO.TextWriter
debugMode bool
return System

Run() public method

public Run ( ) : int
return int

Run() public static method

Run the specified command through the shell specified in the COMSPEC environment variable. Output is sent to the default console output and error streams.
public static Run ( string programAndArgs ) : int
programAndArgs string The command to pass to the shell.
return int

Run() public static method

Run the specified command through the shell specified in the COMSPEC or SHELL environment variable.
public static Run ( string programAndArgs, TextWriter outputWriter, TextWriter errorWriter, bool debugMode ) : int
programAndArgs string The command to pass to the shell.
outputWriter System.IO.TextWriter The stream to which the standard output stream will be redirected.
errorWriter System.IO.TextWriter The stream to which the standard error stream will be redirected.
debugMode bool Debug mode
return int

Run() public static method

Run the specified command through the shell specified in the COMSPEC environment variable.
public static Run ( string programAndArgs, string &output ) : int
programAndArgs string The command to pass to the shell.
output string Interleaved results from standard output and standard error streams.
return int

Run() public static method

public static Run ( string programAndArgs, string &output, bool debugMode ) : int
programAndArgs string
output string
debugMode bool
return int

Run() public static method

Run the specified command through the shell specified in the COMSPEC environment variable.
public static Run ( string programAndArgs, string &output, string &error ) : int
programAndArgs string The command to pass to the shell.
output string Results from standard output stream.
error string Results from standard error stream.
return int