Skip to main content

DefaultProcessImpl class

Namespace: Velopack.Locators

public class DefaultProcessImpl : IProcessImpl

Implements: IProcessImpl

Constructors​

ConstructorSummary
DefaultProcessImpl

DefaultProcessImpl(logger)​

public DefaultProcessImpl(IVelopackLogger logger)

Parameters

NameTypeDescription
loggerIVelopackLogger

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()​

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

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)​

public void Exit(int exitCode)

Exit the current process with the given exit code.

Parameters

NameTypeDescription
exitCodeintThe exit code

Generated from Velopack 1.2.0