コード例 #1
0
        public override bool Equals(object obj)
        {
            if (!(obj is WireList))
            {
                return(false);
            }

            WireList other = (WireList)obj;

            if (other.m_wires.Count != m_wires.Count)
            {
                return(false);
            }

            foreach (Wire w in other)
            {
                if (!HasWire(w))
                {
                    return(false);
                }
            }
            return(true);
        }
コード例 #2
0
 public bool Contains(WireList wires)
 {
     return(m_wires.ContainsKey(wires.GetHashCode()));
 }
コード例 #3
0
 public void Add(int hashCode, WireList wires)
 {
     m_wires.Add(hashCode, wires);
 }