C# Class DoxyRunner, Droid-Soccer

This class spawns and runs Doxygen in a separate thread, and could serve as an example of how to create plugins for unity that call a command line application and then get the data back into Unity safely.
ファイルを表示 Open project: repelex/Droid-Soccer Class Usage Examples

Public Properties

Property Type Description
Args string[]
EXE string
onCompleteCallBack Action

Public Methods

Method Description
DoxyRunner ( string exepath, string args, DoxyThreadSafeOutput, safeoutput, Action callback ) : UnityEngine
EscapeArguments ( ) : string

Quotes all arguments that contain whitespace, or begin with a quote and returns a single argument string for use with Process.Start().

FindExePath ( string exe ) : string

Expands environment variables and, if unqualified, locates the exe in the working directory or the evironment's path.

Run ( Action output, TextReader input, string exe ) : int

Runs the specified executable with the provided arguments and returns the process' exit code.

RunThreadedDoxy ( ) : void
updateOuputString ( string output ) : void

Method Details

DoxyRunner() public method

public DoxyRunner ( string exepath, string args, DoxyThreadSafeOutput, safeoutput, Action callback ) : UnityEngine
exepath string
args string
safeoutput DoxyThreadSafeOutput,
callback Action
return UnityEngine

EscapeArguments() public static method

Quotes all arguments that contain whitespace, or begin with a quote and returns a single argument string for use with Process.Start().
Raised when one of the arguments is null Raised if an argument contains '\0', '\r', or '\n'
public static EscapeArguments ( ) : string
return string

FindExePath() public static method

Expands environment variables and, if unqualified, locates the exe in the working directory or the evironment's path.
Raised when the exe was not found
public static FindExePath ( string exe ) : string
exe string The name of the executable file
return string

Run() public static method

Runs the specified executable with the provided arguments and returns the process' exit code.
Raised when the exe was not found Raised when one of the arguments is null
public static Run ( Action output, TextReader input, string exe ) : int
output Action Recieves the output of either std/err or std/out
input TextReader Provides the line-by-line input that will be written to std/in, null for empty
exe string The executable to run, may be unqualified or contain environment variables
return int

RunThreadedDoxy() public method

public RunThreadedDoxy ( ) : void
return void

updateOuputString() public method

public updateOuputString ( string output ) : void
output string
return void

Property Details

Args public_oe property

public string[] Args
return string[]

EXE public_oe property

public string EXE
return string

onCompleteCallBack public_oe property

public Action onCompleteCallBack
return Action