MS.Internal.Xml.Cache.XPathNodeInfoAtom.Equals C# (CSharp) Метод

Equals() публичный Метод

Return true if this InfoAtom has the same values as another InfoAtom.
public Equals ( object other ) : bool
other object
Результат bool
        public override bool Equals(object other) {
            XPathNodeInfoAtom that = other as XPathNodeInfoAtom;
            Debug.Assert(that != null);
            Debug.Assert((object) this.doc == (object) that.doc);
            Debug.Assert(this.pageInfo == null);

            // Assume that name parts are atomized
            if (this.GetHashCode() == that.GetHashCode()) {
                if ((object) this.localName == (object) that.localName &&
                    (object) this.pageSibling == (object) that.pageSibling &&
                    (object) this.namespaceUri == (object) that.namespaceUri &&
                    (object) this.pageParent == (object) that.pageParent &&
                    (object) this.pageSimilar == (object) that.pageSimilar &&
                    (object) this.prefix == (object) that.prefix &&
                    (object) this.baseUri == (object) that.baseUri &&
                    this.lineNumBase == that.lineNumBase &&
                    this.linePosBase == that.linePosBase) {
                    return true;
                }
            }
            return false;
        }

Usage Example

 private XPathNodeInfoAtom Atomize(XPathNodeInfoAtom info)
 {
     XPathNodeInfoAtom next = this.hashTable[info.GetHashCode() & (this.hashTable.Length - 1)];
     while (next != null)
     {
         if (info.Equals(next))
         {
             info.Next = this.infoCached;
             this.infoCached = info;
             return next;
         }
         next = next.Next;
     }
     if (this.sizeTable >= this.hashTable.Length)
     {
         XPathNodeInfoAtom[] hashTable = this.hashTable;
         this.hashTable = new XPathNodeInfoAtom[hashTable.Length * 2];
         for (int i = 0; i < hashTable.Length; i++)
         {
             XPathNodeInfoAtom atom2;
             for (next = hashTable[i]; next != null; next = atom2)
             {
                 atom2 = next.Next;
                 this.AddInfo(next);
             }
         }
     }
     this.AddInfo(info);
     return info;
 }
All Usage Examples Of MS.Internal.Xml.Cache.XPathNodeInfoAtom::Equals