Revize e6a01bd8
Přidáno uživatelem Pultak před více než 2 roky(ů)
ld_client/LDClient/detection/IProcessUtils.cs | ||
---|---|---|
1 |
using System; |
|
2 |
using System.Collections.Generic; |
|
3 |
using System.Linq; |
|
4 |
using System.Text; |
|
5 |
using System.Threading.Tasks; |
|
1 |
namespace LDClient.detection; |
|
6 | 2 |
|
7 |
namespace LDClient.detection { |
|
8 |
|
|
3 |
/// <summary> |
|
4 |
/// This interface defines the functionality of all methods that |
|
5 |
/// are used to work with processes (within this project). |
|
6 |
/// </summary> |
|
7 |
public interface IProcessUtils { |
|
8 |
|
|
9 | 9 |
/// <summary> |
10 |
/// This interface defines the functionality of all methods that |
|
11 |
/// are used to work with processes (within this project). |
|
10 |
/// Checks if a process is running or not. |
|
12 | 11 |
/// </summary> |
13 |
public interface IProcessUtils { |
|
14 |
|
|
15 |
/// <summary> |
|
16 |
/// Checks if a process is running or not. |
|
17 |
/// </summary> |
|
18 |
/// <param name="name">Name of the process</param> |
|
19 |
/// <returns>True, if the process is running. False otherwise.</returns> |
|
20 |
public bool IsProcessRunning(string name); |
|
12 |
/// <param name="name">Name of the process</param> |
|
13 |
/// <returns>True, if the process is running. False otherwise.</returns> |
|
14 |
public bool IsProcessRunning(string name); |
|
21 | 15 |
|
22 |
/// <summary> |
|
23 |
/// Executes a new process (t32rem.exe) with arguments which are passed in |
|
24 |
/// as a parameter of the method. |
|
25 |
/// </summary> |
|
26 |
/// <param name="fileName">Path to the .exe file</param> |
|
27 |
/// <param name="argument">Arguments passed into the .exe file</param> |
|
28 |
/// <param name="timeout">Timeout used when waiting for the process to terminate</param> |
|
29 |
/// <param name="desiredExitCode">Status code indicating a successful termination of the process.</param> |
|
30 |
/// <returns>True, if the command was executed successfully. False otherwise.</returns> |
|
31 |
public bool ExecuteNewProcess(string fileName, string argument, int timeout, int desiredExitCode); |
|
32 |
} |
|
33 |
} |
|
16 |
/// <summary> |
|
17 |
/// Executes a new process (t32rem.exe) with arguments which are passed in |
|
18 |
/// as a parameter of the method. |
|
19 |
/// </summary> |
|
20 |
/// <param name="fileName">Path to the .exe file</param> |
|
21 |
/// <param name="argument">Arguments passed into the .exe file</param> |
|
22 |
/// <param name="timeout">Timeout used when waiting for the process to terminate</param> |
|
23 |
/// <param name="desiredExitCode">Status code indicating a successful termination of the process.</param> |
|
24 |
/// <returns>True, if the command was executed successfully. False otherwise.</returns> |
|
25 |
public bool ExecuteNewProcess(string fileName, string argument, int timeout, int desiredExitCode); |
|
26 |
} |
Také k dispozici: Unified diff
re #9712 Added documentation of the newly implemented methods + refactoring