DefaultProcessImpl class
Namespace: Velopack.Locators
public class DefaultProcessImpl : IProcessImpl
Implements: IProcessImpl
Constructors
| Constructor | Summary |
|---|---|
DefaultProcessImpl |
DefaultProcessImpl(logger)
public DefaultProcessImpl(IVelopackLogger logger)
Parameters
| Name | Type | Description |
|---|---|---|
logger | IVelopackLogger |
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()
public string GetCurrentProcessPath()
Gets the full path to the current process executable.
Returns string — The full path to the current process executable.
GetCurrentProcessId()
public uint GetCurrentProcessId()
Gets the process ID of the current process.
Returns uint — The process ID of the current process.
StartProcess(exePath, args, workDir, showWindow)
public 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)
public 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