microsoft/TypeAgent
Publicmirrored fromhttps://github.com/microsoft/TypeAgentAvailable
dotnet/autoShell/Services/IProcessService.cs
27lines · modecode
| 1 | // Copyright (c) Microsoft Corporation. |
| 2 | // Licensed under the MIT License. |
| 3 | |
| 4 | using System.Diagnostics; |
| 5 | |
| 6 | namespace autoShell.Services; |
| 7 | |
| 8 | /// <summary> |
| 9 | /// Abstracts process management operations for testability. |
| 10 | /// </summary> |
| 11 | internal interface IProcessService |
| 12 | { |
| 13 | /// <summary> |
| 14 | /// Returns all processes with the specified name. |
| 15 | /// </summary> |
| 16 | Process[] GetProcessesByName(string name); |
| 17 | |
| 18 | /// <summary> |
| 19 | /// Starts a new process with the specified start info. |
| 20 | /// </summary> |
| 21 | Process Start(ProcessStartInfo startInfo); |
| 22 | |
| 23 | /// <summary> |
| 24 | /// Starts a process using the OS shell (e.g., opening a URL or file). |
| 25 | /// </summary> |
| 26 | void StartShellExecute(string fileName); |
| 27 | } |
| 28 | |