ProcessInstance Class
Represents a running process. Resources are released automatically when the process exits. Await to wait for exit and get a ProcessResult.
public class ProcessInstanceProperties
| Name | Description |
|---|---|
| ProcessId | Gets the process ID. |
| StartDate | Gets the time the process was started. |
ProcessId
ProcessInstance.csStartDate
ProcessInstance.csMethods
| Name | Description |
|---|---|
| ConfigureAwait(bool) | Configures whether to marshal continuations back to the captured context. |
| ConfigureAwait(ConfigureAwaitOptions) | Configures how awaits on this instance are performed. |
| GetAwaiter() | Gets an awaiter that waits for the process to exit and returns the process result. |
| Kill(bool) | Kills the process. |
| Signal(PosixSignal) | Sends a signal to the process. |
| UnsafeGetProcessHandle() | Gets the handle to the process. Returns null once the process has exited and resources were released. |
ConfigureAwait overloads
ConfigureAwait(bool)
ProcessInstance.csConfigures whether to marshal continuations back to the captured context.
public ConfiguredTaskAwaitable<ProcessResult> ConfigureAwait(bool continueOnCapturedContext)ConfigureAwait(ConfigureAwaitOptions)
ProcessInstance.csConfigures how awaits on this instance are performed.
public ConfiguredTaskAwaitable<ProcessResult> ConfigureAwait(ConfigureAwaitOptions options)GetAwaiter()
ProcessInstance.csGets an awaiter that waits for the process to exit and returns the process result.
public TaskAwaiter<ProcessResult> GetAwaiter()Returns
Kill(bool)
ProcessInstance.csSignal(PosixSignal)
ProcessInstance.csAvailable in: net11.0(not available in the other target frameworks of the package)
- Supported on maccatalyst
- Not supported on ios
- Not supported on tvos
Sends a signal to the process.
[SupportedOSPlatform("maccatalyst")]
[UnsupportedOSPlatform("ios")]
[UnsupportedOSPlatform("tvos")]
public bool Signal(PosixSignal signal)UnsafeGetProcessHandle()
ProcessInstance.csGets the handle to the process. Returns null once the process has exited and resources were released.
public SafeProcessHandle? UnsafeGetProcessHandle()