C# Class ProcessUtilities.UtilityBackgroundProcess

Datei anzeigen Open project: ryanski44/VM-Automation-Framework Class Usage Examples

Public Properties

Property Type Description
proc System.Diagnostics.Process

Private Properties

Property Type Description
FlushOutputs bool
onDebugMessageSent void
proc_ErrorDataReceived void
proc_OutputDataReceived void

Public Methods

Method Description
GetChildProcesses ( int processID ) : System.Diagnostics.Process[]
GetParentProcessID ( Process p ) : int?
Run ( string arguments ) : bool
Run ( string arguments, string workingDir ) : bool
Stop ( ) : void
UtilityBackgroundProcess ( string program ) : System
WaitForExit ( ) : bool
WaitForExit ( System.TimeSpan timeout ) : bool
WaitForStandardOutput ( string toWatchFor ) : bool
WaitForStandardOutput ( string toWatchFor, System.TimeSpan maxWait ) : bool
WaitForSubProcessToExit ( ) : void

Private Methods

Method Description
FlushOutputs ( System.TimeSpan maxWaitTime ) : bool
onDebugMessageSent ( string message ) : void
proc_ErrorDataReceived ( object sender, DataReceivedEventArgs outLine ) : void
proc_OutputDataReceived ( object sendingProcess, DataReceivedEventArgs outLine ) : void

Method Details

GetChildProcesses() public static method

public static GetChildProcesses ( int processID ) : System.Diagnostics.Process[]
processID int
return System.Diagnostics.Process[]

GetParentProcessID() public static method

public static GetParentProcessID ( Process p ) : int?
p System.Diagnostics.Process
return int?

Run() public method

public Run ( string arguments ) : bool
arguments string
return bool

Run() public method

public Run ( string arguments, string workingDir ) : bool
arguments string
workingDir string
return bool

Stop() public method

public Stop ( ) : void
return void

UtilityBackgroundProcess() public method

public UtilityBackgroundProcess ( string program ) : System
program string
return System

WaitForExit() public method

public WaitForExit ( ) : bool
return bool

WaitForExit() public method

public WaitForExit ( System.TimeSpan timeout ) : bool
timeout System.TimeSpan
return bool

WaitForStandardOutput() public method

public WaitForStandardOutput ( string toWatchFor ) : bool
toWatchFor string
return bool

WaitForStandardOutput() public method

public WaitForStandardOutput ( string toWatchFor, System.TimeSpan maxWait ) : bool
toWatchFor string
maxWait System.TimeSpan
return bool

WaitForSubProcessToExit() public method

public WaitForSubProcessToExit ( ) : void
return void

Property Details

proc public_oe property

public Process,System.Diagnostics proc
return System.Diagnostics.Process