public override bool Equals(object obj) { if (obj == null) { return(false); } MonitoredSystemState s = obj as MonitoredSystemState; if ((System.Object)s == null) { return(false); } return(Equals(s)); }
public bool Equals(MonitoredSystemState s) { if ((object)s == null) { return(false); } if (this.Level != s.Level) { return(false); } List <int> otherPlugins = s.ShownPlugins; foreach (int x in ShownPlugins) { if (!otherPlugins.Remove(x)) { return(false); } } return(otherPlugins.Count == 0); }