using System.Diagnostics; namespace SHH.ProcessLaunchers { /// /// 资源哨兵接口 (策略模式) /// public interface IResourceGuard { /// /// 哨兵名称 (如 MemoryGuard) /// string Name { get; } /// /// 执行健康检查 /// /// 正在运行的进程对象 /// [输出] 如果异常,返回详细原因描述 /// 检查结果 (Normal/Warning/Critical) GuardResult Check(Process process, out string reason); /// /// 人工复位/标记已处置 /// 用户在 UI 点击“已处置”后调用,用于清除内部的报警锁定状态 (Latch) /// void Reset(); } }