C# Class cdcrush.lib.app.CliApp

Afficher le fichier Open project: john32b/cdcrush.net Class Usage Examples

Méthodes publiques

Свойство Type Description
flag_disable_user_stdout bool
flag_stdout_word_mode bool
onComplete Action
onStdErr Action
onStdIOReady Action
onStdOut Action
onStdOutWord Action
threads List

Méthodes publiques

Méthode Description
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

Private Methods

Méthode Description
captureWords ( ) : void

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

Method Details

CliApp() public méthode

Starts a CLI app in a new thread
public CliApp ( string exec ) : System
exec string Path to the executable
Résultat System

exists() static public méthode

Check to see if an executable exists / can be run
static public exists ( string exePath ) : bool
exePath string
Résultat bool

kill() public méthode

public kill ( ) : void
Résultat void

quickStart() static public méthode

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
Résultat CliApp

quickStartSync() static public méthode

static public quickStartSync ( string exePath, string args = null ) : string[]
exePath string
args string
Résultat string[]

start() public méthode

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
Résultat void

Property Details

flag_disable_user_stdout public_oe property

Set to true to disable ALL user stdout calls. Enable this if you want to pipe the stdout
public bool flag_disable_user_stdout
Résultat bool

flag_stdout_word_mode public_oe property

When some CLI apps don't flush their stdOut, capture it raw word by word. Access `onStdOutWord`
public bool flag_stdout_word_mode
Résultat bool

onComplete public_oe property

Called when the application exits. 0 = OK, 1 = Error, 2 = Could not run EXE
public Action onComplete
Résultat Action

onStdErr public_oe property

Pushes the STDERR as it happens from the app
public Action onStdErr
Résultat Action

onStdIOReady public_oe property

public Action onStdIOReady
Résultat Action

onStdOut public_oe property

Pushes the STDOUT as is happens from the app
public Action onStdOut
Résultat Action

onStdOutWord public_oe property

Valid only if you set `flag_stdout_word_mode` to true Pushes words read from the STDOUT
public Action onStdOutWord
Résultat Action

threads public_oe static_oe property

public static List threads
Résultat List