C# Class Tp.Utils.Sys.Executor

Executes command in a console window, reads its output.
Afficher le fichier Open project: TargetProcess/Target-Process-Plugins

Méthodes publiques

Méthode Description
Execute ( string command, string arguments, Encoding encoding, string &output, string &errorOutput ) : int

Executes the specified command with the specified arguments, reads command's output and error output.

Execute ( string command, string arguments, Encoding encoding, string input, string &output, string &errorOutput ) : int

Executes the specified command with the specified arguments, writes command's input, reads command's output and error output.

Execute ( string command, string arguments, byte &output, string &errorOutput ) : int

Executes the specified command with the specified arguments, reads command's output and error output.

Execute ( string command, string arguments, string input, byte &output, string &errorOutput ) : int

Executes the specified command with the specified arguments, reads command's output and error output.

Execute ( string command, string arguments, string &output, string &errorOutput ) : int

Executes the specified command with the specified arguments, reads command's output and error output using UTF8 Encoding

Execute ( string command, string arguments, string input, string &output, string &errorOutput ) : int

Executes the specified command with the specified arguments, writes command's input, reads command's output and error output using UTF8 Encoding

Private Methods

Méthode Description
CreateProcess ( string command, string arguments, Encoding encoding ) : Process
Read ( Stream input, Stream output ) : void
Read ( TextReader reader, StringBuilder output ) : void
StartProcess ( Process process, string command ) : void
WaitProcessForExit ( Process process, string command ) : void

Method Details

Execute() public méthode

Executes the specified command with the specified arguments, reads command's output and error output.
If command is null or empty string.
public Execute ( string command, string arguments, Encoding encoding, string &output, string &errorOutput ) : int
command string The command to execute.
arguments string Command arguments.
encoding System.Text.Encoding The encoding to decode standart output and standard error stream, or null if using default encoding.
output string Command output.
errorOutput string Command error output.
Résultat int

Execute() public méthode

Executes the specified command with the specified arguments, writes command's input, reads command's output and error output.
If command is null or empty string.
public Execute ( string command, string arguments, Encoding encoding, string input, string &output, string &errorOutput ) : int
command string The command to execute.
arguments string Command arguments.
encoding System.Text.Encoding The encoding to decode standart output and standard error stream, or null if using default encoding.
input string Input to the command.
output string Command output.
errorOutput string Command error output.
Résultat int

Execute() public méthode

Executes the specified command with the specified arguments, reads command's output and error output.
public Execute ( string command, string arguments, byte &output, string &errorOutput ) : int
command string The command to execute.
arguments string Command arguments.
output byte Command output.
errorOutput string Command error output.
Résultat int

Execute() public méthode

Executes the specified command with the specified arguments, reads command's output and error output.
public Execute ( string command, string arguments, string input, byte &output, string &errorOutput ) : int
command string The command to execute.
arguments string Command arguments.
input string Input to the command.
output byte Command output.
errorOutput string Command error output.
Résultat int

Execute() public méthode

Executes the specified command with the specified arguments, reads command's output and error output using UTF8 Encoding
If command is null or empty string.
public Execute ( string command, string arguments, string &output, string &errorOutput ) : int
command string The command to execute.
arguments string Command arguments.
output string Command output.
errorOutput string Command error output.
Résultat int

Execute() public méthode

Executes the specified command with the specified arguments, writes command's input, reads command's output and error output using UTF8 Encoding
If command is null or empty string.
public Execute ( string command, string arguments, string input, string &output, string &errorOutput ) : int
command string The command to execute.
arguments string Command arguments.
input string Input to the command.
output string Command output.
errorOutput string Command error output.
Résultat int