System.Xml.XmlWellFormedWriter.AddToAttrHashTable C# (CSharp) Méthode

AddToAttrHashTable() private méthode

private AddToAttrHashTable ( int attributeIndex ) : void
attributeIndex int
Résultat void
        private void AddToAttrHashTable(int attributeIndex)
        {
            string localName = _attrStack[attributeIndex].localName;
            int count = _attrHashTable.Count;
            _attrHashTable[localName] = 0; // overwrite on collision
            if (count != _attrHashTable.Count)
            {
                return;
            }
            // chain to previous attribute in stack with the same localName
            int prev = attributeIndex - 1;
            while (prev >= 0)
            {
                if (_attrStack[prev].localName == localName)
                {
                    break;
                }
                prev--;
            }
            Debug.Assert(prev >= 0 && _attrStack[prev].localName == localName);
            _attrStack[attributeIndex].prev = prev + 1; // indexes are stored incremented by 1 
        }
    }