public bool Equals(ProcessToMonitor other) { if (other == null) { return(false); } return(this.GetHashCode() == other.GetHashCode()); }
public override bool Equals(object obj) { if (obj == null || GetType() != obj.GetType()) { return(false); } ProcessToMonitor other = obj as ProcessToMonitor; return(this.Equals(other)); }
private CheckSuspendResult CheckProcess(ProcessToMonitor process) { var p = Process.GetProcesses(); for (int i = 0; i < p.Length; i++) { if (p[i].ProcessName.ToLower() == process.ProcessName.ToLower()) { return(new CheckSuspendResult(true, String.Format(Resources.Wsapm_Core.ProcessCheck_ProcessFoundReason, p[i].ProcessName))); } } return(new CheckSuspendResult(false, String.Empty)); }