Пример #1
0
        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));
        }
Пример #2
0
        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);
        }