C# 클래스 LazyCopy.Utilities.ProcessHelper

Contains helper methods to work with the system processes.
파일 보기 프로젝트 열기: aleksk/LazyCopy

공개 메소드들

메소드 설명
GetProcessName ( int processId ) : string

Gets the process name based on its processId.

GetUserNameForProcess ( Process process ) : string

Gets the name of the user for the process given.

RunProcess ( string fileName, string arguments, Action outputCallback ) : int

Starts a new fileName application with no console window created, and waits for its to finish, optionally redirecting its output to the outputCallback specified.

RunProcess ( string fileName, string arguments, string[]>.Func outputFunc ) : int

Starts a new fileName application with no console window created, and waits for its to finish, optionally redirecting its output to the outputFunc specified.

비공개 메소드들

메소드 설명
FindUserProcesses ( string domainUser ) : IEnumerable
GetUserNameForSid ( IntPtr sid ) : string

Gets the username for the sid given.

메소드 상세

GetProcessName() 공개 정적인 메소드

Gets the process name based on its processId.
is lesser than -1.
public static GetProcessName ( int processId ) : string
processId int Process Id.
리턴 string

GetUserNameForProcess() 공개 정적인 메소드

Gets the name of the user for the process given.
is . /// Process token cannot be obtained. /// -or- /// Process token information cannot be retrieved. /// -or- /// Account information cannot be found. ///
public static GetUserNameForProcess ( Process process ) : string
process System.Diagnostics.Process Process to get username for.
리턴 string

RunProcess() 공개 정적인 메소드

Starts a new fileName application with no console window created, and waits for its to finish, optionally redirecting its output to the outputCallback specified.
is or empty.
public static RunProcess ( string fileName, string arguments, Action outputCallback ) : int
fileName string Path to the application executable.
arguments string Application arguments. Might be .
outputCallback Action Callback that receives process output. Might be .
리턴 int

RunProcess() 공개 정적인 메소드

Starts a new fileName application with no console window created, and waits for its to finish, optionally redirecting its output to the outputFunc specified.
is or empty.
public static RunProcess ( string fileName, string arguments, string[]>.Func outputFunc ) : int
fileName string Path to the application executable.
arguments string Application arguments. Might be .
outputFunc string[]>.Func /// Function that receives process output, and its output is redirected to the process input stream. /// Might be . ///
리턴 int