C# Класс Tp.Utils.Sys.Executor

Executes command in a console window, reads its output.
Показать файл Открыть проект

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

Метод Описание
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

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

Метод Описание
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

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

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

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.
Результат int

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

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.
Результат int

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

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.
Результат int

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

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.
Результат int

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

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.
Результат int

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

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.
Результат int