Skip to main content

IProcessImpl interface

Namespace: Velopack.Locators

Provides an abstraction for process-related operations, allowing for platform-specific implementations.

public interface IProcessImpl

Methods​

MethodSummary
GetCurrentProcessPathGets the full path to the current process executable.
GetCurrentProcessIdGets the process ID of the current process.
StartProcessStarts a new process with the specified executable path, arguments, and options.
ExitExit the current process with the given exit code.

GetCurrentProcessPath()​

string GetCurrentProcessPath()

Gets the full path to the current process executable.

Returns string — The full path to the current process executable.

GetCurrentProcessId()​

uint GetCurrentProcessId()

Gets the process ID of the current process.

Returns uint — The process ID of the current process.

StartProcess(exePath, args, workDir, showWindow)​

void StartProcess(string exePath, IEnumerable<string> args, string workDir, bool showWindow)

Starts a new process with the specified executable path, arguments, and options.

Parameters

NameTypeDescription
exePathstringThe path to the executable to start.
argsIEnumerable<string>The command-line arguments to pass to the process.
workDirstringThe working directory for the new process.
showWindowboolWhether to show a window for the new process.

Exit(exitCode)​

void Exit(int exitCode)

Exit the current process with the given exit code.

Parameters

NameTypeDescription
exitCodeintThe exit code

Generated from Velopack 1.2.0