C# Класс cdcrush.lib.app.CliApp

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

Открытые свойства

Свойство Тип Описание
flag_disable_user_stdout bool
flag_stdout_word_mode bool
onComplete Action
onStdErr Action
onStdIOReady Action
onStdOut Action
onStdOutWord Action
threads List

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

Метод Описание
CliApp ( string exec ) : System

Starts a CLI app in a new thread

exists ( string exePath ) : bool

Check to see if an executable exists / can be run

kill ( ) : void
quickStart ( string filename, string args = null, Action OnComplete = null ) : CliApp

Quickly create a CLI APP and return it

quickStartSync ( string exePath, string args = null ) : string[]
start ( string args = null, string workingDir = null ) : void

Start a thread in a new thread, it will keep going

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

Метод Описание
captureWords ( ) : void

Start capturing words from the stdout stream and push them on the callback

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

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

Starts a CLI app in a new thread
public CliApp ( string exec ) : System
exec string Path to the executable
Результат System

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

Check to see if an executable exists / can be run
static public exists ( string exePath ) : bool
exePath string
Результат bool

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

public kill ( ) : void
Результат void

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

Quickly create a CLI APP and return it
static public quickStart ( string filename, string args = null, Action OnComplete = null ) : CliApp
filename string
args string
OnComplete Action
Результат CliApp

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

static public quickStartSync ( string exePath, string args = null ) : string[]
exePath string
args string
Результат string[]

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

Start a thread in a new thread, it will keep going
public start ( string args = null, string workingDir = null ) : void
args string Arguments
workingDir string
Результат void

Описание свойств

flag_disable_user_stdout публичное свойство

Set to true to disable ALL user stdout calls. Enable this if you want to pipe the stdout
public bool flag_disable_user_stdout
Результат bool

flag_stdout_word_mode публичное свойство

When some CLI apps don't flush their stdOut, capture it raw word by word. Access `onStdOutWord`
public bool flag_stdout_word_mode
Результат bool

onComplete публичное свойство

Called when the application exits. 0 = OK, 1 = Error, 2 = Could not run EXE
public Action onComplete
Результат Action

onStdErr публичное свойство

Pushes the STDERR as it happens from the app
public Action onStdErr
Результат Action

onStdIOReady публичное свойство

public Action onStdIOReady
Результат Action

onStdOut публичное свойство

Pushes the STDOUT as is happens from the app
public Action onStdOut
Результат Action

onStdOutWord публичное свойство

Valid only if you set `flag_stdout_word_mode` to true Pushes words read from the STDOUT
public Action onStdOutWord
Результат Action

threads публичное статическое свойство

public static List threads
Результат List