C# Класс 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.
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
Args string[]
EXE string
onCompleteCallBack Action

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

Метод Описание
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

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

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

public DoxyRunner ( string exepath, string args, DoxyThreadSafeOutput, safeoutput, Action callback ) : UnityEngine
exepath string
args string
safeoutput DoxyThreadSafeOutput,
callback Action
Результат UnityEngine

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

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
Результат string

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

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
Результат string

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

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
Результат int

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

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

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

public updateOuputString ( string output ) : void
output string
Результат void

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

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

public string[] Args
Результат string[]

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

public string EXE
Результат string

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

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