C# 클래스 GSF.Console.Command

Defines methods related to command line operations
파일 보기 프로젝트 열기: GridProtectionAlliance/gsf

공개 메소드들

메소드 설명
Execute ( string fileName, string arguments = null, int timeout = Timeout.Infinite ) : GSF.Console.CommandResponse

Executes a command line operation and returns its standard output and exit code or throws an exception with the standard error.

Execute ( string fileName, string arguments, string &standardOutput, string &standardError, bool &processCompleted, int &exitCode, int timeout ) : bool

Executes a command line operation and returns true if there was no standard error reported.

Execute ( string fileName, string arguments, string &standardOutput, string &standardError, int &exitCode ) : bool

Executes a command line operation and returns true if there was no standard error reported.

This function waits indefinitely for the command line operation to complete.

ShellDecode ( this parameter ) : string

Decodes a command line parameter previously encoded by ShellEncode.

ShellEncode ( this parameter ) : string

Shell encodes a command line parameter by converting "\" to "\\".

메소드 상세

Execute() 공개 정적인 메소드

Executes a command line operation and returns its standard output and exit code or throws an exception with the standard error.
/// Exception occurs when executed command process reports standard error output or process times-out. ///
public static Execute ( string fileName, string arguments = null, int timeout = Timeout.Infinite ) : GSF.Console.CommandResponse
fileName string Command line file name to execute.
arguments string Command line arguments to use, if any.
timeout int Timeout, in milliseconds, to wait for command line operation to complete.
리턴 GSF.Console.CommandResponse

Execute() 공개 정적인 메소드

Executes a command line operation and returns true if there was no standard error reported.
public static Execute ( string fileName, string arguments, string &standardOutput, string &standardError, bool &processCompleted, int &exitCode, int timeout ) : bool
fileName string Command line file name to execute.
arguments string Command line arguments to use, if any.
standardOutput string Any standard output reported by the command line operation.
standardError string Any standard error reported by the command line operation.
processCompleted bool Flag that determines if process completed or timed-out. This is only relevant if is not -1.
exitCode int Exit code of the process, assuming process successfully completed.
timeout int Timeout, in milliseconds, to wait for command line operation to complete. Set to , i.e., -1, for infinite wait.
리턴 bool

Execute() 공개 정적인 메소드

Executes a command line operation and returns true if there was no standard error reported.
This function waits indefinitely for the command line operation to complete.
public static Execute ( string fileName, string arguments, string &standardOutput, string &standardError, int &exitCode ) : bool
fileName string Command line file name to execute.
arguments string Command line arguments to use, if any.
standardOutput string Any standard output reported by the command line operation.
standardError string Any standard error reported by the command line operation.
exitCode int Exit code of the process, assuming process successfully completed.
리턴 bool

ShellDecode() 공개 정적인 메소드

Decodes a command line parameter previously encoded by ShellEncode.
public static ShellDecode ( this parameter ) : string
parameter this Parameter to decode.
리턴 string

ShellEncode() 공개 정적인 메소드

Shell encodes a command line parameter by converting "\" to "\\".
public static ShellEncode ( this parameter ) : string
parameter this Parameter to shell encode.
리턴 string