C# 클래스 Google.PowerShell.Common.ProcessUtils

This class defines helper methods for starting sub-processes and getting the output from the processes.
파일 보기 프로젝트 열기: GoogleCloudPlatform/google-cloud-powershell 1 사용 예제들

공개 메소드들

메소드 설명
GetCommandOutput ( string file, string args, string>.IDictionary environment = null ) : Task

Runs a process until it exits, returns it's complete output.

RunCommand ( string file, string args, EventHandler handler, string>.IDictionary environment = null ) : Task

Runs the given binary given by file with the passed in args and reads the output of the new process as it happens, calling handler with each line being output by the process. Uses environment if provided to customize the environment of the child process.

비공개 메소드들

메소드 설명
GetBaseStartInfo ( string file, string args, string>.IDictionary environment ) : ProcessStartInfo
GetStartInfoForInteractiveProcess ( string file, string args, string>.IDictionary environment ) : ProcessStartInfo
ReadLinesFromOutput ( OutputStream outputStream, StreamReader stream, EventHandler handler ) : System.Threading.Tasks.Task

메소드 상세

GetCommandOutput() 공개 정적인 메소드

Runs a process until it exits, returns it's complete output.
public static GetCommandOutput ( string file, string args, string>.IDictionary environment = null ) : Task
file string The path to the exectuable.
args string The arguments to pass to the executable.
environment string>.IDictionary The environment variables to use for the executable.
리턴 Task

RunCommand() 공개 정적인 메소드

Runs the given binary given by file with the passed in args and reads the output of the new process as it happens, calling handler with each line being output by the process. Uses environment if provided to customize the environment of the child process.
public static RunCommand ( string file, string args, EventHandler handler, string>.IDictionary environment = null ) : Task
file string The path to the binary to execute, it must not be null.
args string The arguments to pass to the binary to execute, it can be null.
handler EventHandler The callback to call with the line being oput by the process, it can be called outside /// of the UI thread. Must not be null.
environment string>.IDictionary Optional parameter with values for environment variables to pass on to the child process.
리턴 Task