C# Class cdcrush.lib.app.CliApp

Mostrar archivo Open project: john32b/cdcrush.net Class Usage Examples

Public Properties

Property Type Description
flag_disable_user_stdout bool
flag_stdout_word_mode bool
onComplete Action
onStdErr Action
onStdIOReady Action
onStdOut Action
onStdOutWord Action
threads List

Public Methods

Method 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

Method Description
captureWords ( ) : void

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

Method Details

CliApp() public method

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

exists() static public method

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

kill() public method

public kill ( ) : void
return void

quickStart() static public method

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
return CliApp

quickStartSync() static public method

static public quickStartSync ( string exePath, string args = null ) : string[]
exePath string
args string
return string[]

start() public method

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
return 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
return 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
return bool

onComplete public_oe property

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

onStdErr public_oe property

Pushes the STDERR as it happens from the app
public Action onStdErr
return Action

onStdIOReady public_oe property

public Action onStdIOReady
return Action

onStdOut public_oe property

Pushes the STDOUT as is happens from the app
public Action onStdOut
return 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
return Action

threads public_oe static_oe property

public static List threads
return List