MS.Internal.Xml.Cache.XPathNode.SetSimilarElement C# (CSharp) Method

SetSimilarElement() public method

Link this element to the next element in document order that shares a local name having the same hash code. If "pageSimilar" is different than the one stored in the InfoAtom, re-atomize.
public SetSimilarElement ( XPathNodeInfoTable infoTable, XPathNode pageSimilar, int idxSimilar ) : void
infoTable XPathNodeInfoTable
pageSimilar XPathNode
idxSimilar int
return void
        public void SetSimilarElement(XPathNodeInfoTable infoTable, XPathNode[] pageSimilar, int idxSimilar) {
            Debug.Assert(pageSimilar != null && idxSimilar != 0 && idxSimilar <= UInt16.MaxValue, "Bad argument");
            Debug.Assert(this.idxSimilar == 0, "SetSimilarElement should not be called more than once.");
            this.idxSimilar = (ushort) idxSimilar;

            if (pageSimilar != this.info.SimilarElementPage) {
                // Re-atomize the InfoAtom
                this.info = infoTable.Create(this.info.LocalName, this.info.NamespaceUri, this.info.Prefix, this.info.BaseUri,
                                             this.info.ParentPage, this.info.SiblingPage, pageSimilar,
                                             this.info.Document, this.info.LineNumberBase, this.info.LinePositionBase);
            }
        }
    }