-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathIProcessHelper.cs
More file actions
33 lines (30 loc) · 1.68 KB
/
Copy pathIProcessHelper.cs
File metadata and controls
33 lines (30 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
using System;
using System.Diagnostics;
namespace AET.SteamAbstraction.Utilities;
/// <summary>
/// Provides utility methods for managing and interacting with system processes.
/// </summary>
internal interface IProcessHelper
{
/// <summary>
/// Determines whether a process with the specified process identifier (PID) is currently running.
/// </summary>
/// <param name="pid">The process identifier (PID) to check.</param>
/// <returns>
/// <see langword="true"/> if a process with the specified PID is running; otherwise, <see langword="false"/>.
/// </returns>
/// <remarks>
/// This method attempts to retrieve the process by its PID. If the process does not exist or cannot be accessed,
/// it returns <see langword="false"/>.
/// </remarks>
bool IsProcessRunning(int pid);
/// <summary>
/// Starts a new process using the specified <see cref="ProcessStartInfo"/> configuration.
/// </summary>
/// <param name="startInfo"> The <see cref="ProcessStartInfo"/> object that specifies the configuration for the process to be started.</param>
/// <returns> A <see cref="Process"/> object that represents the started process, or <see langword="null"/> if the process could not be started.</returns>
/// <exception cref="ArgumentNullException">Thrown if <paramref name="startInfo"/> is <see langword="null"/>.</exception>
/// <exception cref="InvalidOperationException">Thrown if no file name is specified in <paramref name="startInfo"/>.</exception>
/// <exception cref="System.ComponentModel.Win32Exception">Thrown if an error occurs when opening the associated file.</exception>
Process? StartProcess(ProcessStartInfo startInfo);
}