IProcessImpl interface
Namespace: Velopack.Locators
Provides an abstraction for process-related operations, allowing for platform-specific implementations.
public interface IProcessImpl
Methods
| Method | Summary |
|---|---|
GetCurrentProcessPath | Gets the full path to the current process executable. |
GetCurrentProcessId | Gets the process ID of the current process. |
StartProcess | Starts a new process with the specified executable path, arguments, and options. |
Exit | Exit 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
| Name | Type | Description |
|---|---|---|
exePath | string | The path to the executable to start. |
args | IEnumerable<string> | The command-line arguments to pass to the process. |
workDir | string | The working directory for the new process. |
showWindow | bool | Whether to show a window for the new process. |
Exit(exitCode)
void Exit(int exitCode)
Exit the current process with the given exit code.
Parameters
| Name | Type | Description |
|---|---|---|
exitCode | int | The exit code |
Generated from Velopack 1.1.1