C# Класс Zazzles.ProcessHandler

Показать файл Открыть проект Примеры использования класса

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

Метод Описание
CreateImpersonatedClientEXE ( string filePath, string param, string user ) : Process

Create an process as another user. The process will not be run automatically. This can only be done on unix systems.

Kill ( string name ) : void

Kill the first instance of a process

KillAll ( string name ) : void

Kill all instances of a process

KillAllEXE ( string name ) : void

Kill all instances of an EXE

KillEXE ( string name ) : void

Kill the first instance of an EXE

Run ( string filePath, string param, bool wait = true, bool log = true ) : int

Run a process

Run ( string filePath, string param, bool wait, string &stdout, bool log = true ) : int

Run a process

RunClientEXE ( string file, string param, bool wait = true, bool log = true ) : int

Run an EXE located in the client's directory

RunClientEXE ( string file, string param, bool wait, string &stdout, bool log = true ) : int

Run an EXE located in the client's directory

RunEXE ( string filePath, string param, bool wait = true, bool log = true ) : int

Run an EXE

RunEXE ( string filePath, string param, bool wait, string &stdout, bool log = true ) : int

Run an EXE

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

Метод Описание
SplitOutput ( string output ) : string[]

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

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

Create an process as another user. The process will not be run automatically. This can only be done on unix systems.
public static CreateImpersonatedClientEXE ( string filePath, string param, string user ) : Process
filePath string The path of the executable to run
param string Parameters to run the process with
user string The user to impersonate
Результат System.Diagnostics.Process

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

Kill the first instance of a process
public static Kill ( string name ) : void
name string The name of the process
Результат void

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

Kill all instances of a process
public static KillAll ( string name ) : void
name string The name of the process
Результат void

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

Kill all instances of an EXE
public static KillAllEXE ( string name ) : void
name string The name of the process
Результат void

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

Kill the first instance of an EXE
public static KillEXE ( string name ) : void
name string The name of the EXE
Результат void

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

Run a process
public static Run ( string filePath, string param, bool wait = true, bool log = true ) : int
filePath string The path of the executable to run
param string Parameters to run the process with
wait bool Wait for the process to exit
log bool Log errors
Результат int

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

Run a process
public static Run ( string filePath, string param, bool wait, string &stdout, bool log = true ) : int
filePath string The path of the executable to run
param string Parameters to run the process with
wait bool Wait for the process to exit
stdout string An array to place stdout, split by lines
log bool Log errors
Результат int

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

Run an EXE located in the client's directory
public static RunClientEXE ( string file, string param, bool wait = true, bool log = true ) : int
file string The name of the EXE to run
param string Parameters to run the EXE with
wait bool Wait for the process to exit
log bool Log errors
Результат int

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

Run an EXE located in the client's directory
public static RunClientEXE ( string file, string param, bool wait, string &stdout, bool log = true ) : int
file string The name of the EXE to run
param string Parameters to run the EXE with
wait bool Wait for the process to exit
stdout string An array to place stdout, split by lines
log bool Log errors
Результат int

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

Run an EXE
public static RunEXE ( string filePath, string param, bool wait = true, bool log = true ) : int
filePath string The path of the EXE to run
param string Parameters to run the EXE with
wait bool Wait for the process to exit
log bool Log errors
Результат int

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

Run an EXE
public static RunEXE ( string filePath, string param, bool wait, string &stdout, bool log = true ) : int
filePath string The path of the EXE to run
param string Parameters to run the EXE with
wait bool Wait for the process to exit
stdout string An array to place stdout, split by lines
log bool Log errors
Результат int