C# Класс GitForce.Exec

Contains functions to execute external console applications. Standard streams (stdout/stderr) are captured and returned. Command shell is not invoked as that would prevent capturing the streams. Internally, the invocation is asynchronous.
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
AsyncRun ( PStdoutDelegate pstdout, PStderrDelegate pstderr, PCompleteDelegate pcomplete ) : void
Exec ( string cmd, string args ) : System
Run ( string cmd, string args ) : ExecResult

Main command execution function. Upon completion, prints all errors to the log window.

Terminate ( ) : void

Terminate this job

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

Метод Описание
PErrorDataReceived ( object sender, DataReceivedEventArgs e ) : void

Callback that handles process printing to stderr Collect all strings into one stderr variable and call a custom handler.

POutputDataReceived ( object sender, DataReceivedEventArgs e ) : void

Callback that handles process printing to stdout. Collect all strings into one stdout variable and call a custom handler.

ThreadedRun ( object wait ) : void

Executes a job process and blocks until it completes.

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

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

public AsyncRun ( PStdoutDelegate pstdout, PStderrDelegate pstderr, PCompleteDelegate pcomplete ) : void
pstdout PStdoutDelegate
pstderr PStderrDelegate
pcomplete PCompleteDelegate
Результат void

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

public Exec ( string cmd, string args ) : System
cmd string
args string
Результат System

Run() публичный статический Метод

Main command execution function. Upon completion, prints all errors to the log window.
public static Run ( string cmd, string args ) : ExecResult
cmd string
args string
Результат ExecResult

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

Terminate this job
public Terminate ( ) : void
Результат void