Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ AddAttribute()

void System.Xml.XmlWellFormedWriter.AddAttribute ( string prefix,
string localName,
string namespaceName )
inlineprivate

Definition at line 2976 of file XmlWellFormedWriter.cs.

2977 {
2978 int num = _attrCount++;
2979 if (num == _attrStack.Length)
2980 {
2981 AttrName[] array = new AttrName[num * 2];
2982 Array.Copy(_attrStack, array, num);
2983 _attrStack = array;
2984 }
2985 _attrStack[num].Set(prefix, localName, namespaceName);
2986 if (_attrCount < 14)
2987 {
2988 for (int i = 0; i < num; i++)
2989 {
2990 if (_attrStack[i].IsDuplicate(prefix, localName, namespaceName))
2991 {
2992 throw DupAttrException(prefix, localName);
2993 }
2994 }
2995 return;
2996 }
2997 if (_attrCount == 14)
2998 {
2999 if (_attrHashTable == null)
3000 {
3002 }
3003 for (int j = 0; j < num; j++)
3004 {
3006 }
3007 }
3008 AddToAttrHashTable(num);
3009 int prev;
3010 for (prev = _attrStack[num].prev; prev > 0; prev = _attrStack[prev].prev)
3011 {
3012 prev--;
3013 if (_attrStack[prev].IsDuplicate(prefix, localName, namespaceName))
3014 {
3015 throw DupAttrException(prefix, localName);
3016 }
3017 }
3018 }
Dictionary< string, int > _attrHashTable
void AddToAttrHashTable(int attributeIndex)
static XmlException DupAttrException(string prefix, string localName)
void Set(string prefix, string localName, string namespaceUri)

References System.Xml.XmlWellFormedWriter._attrCount, System.Xml.XmlWellFormedWriter._attrHashTable, System.Xml.XmlWellFormedWriter._attrStack, System.Xml.XmlWellFormedWriter.AddToAttrHashTable(), System.array, System.Array.Copy(), System.Xml.XmlWellFormedWriter.DupAttrException(), System.prefix, System.Xml.XmlWellFormedWriter.AttrName.prev, and System.Xml.XmlWellFormedWriter.AttrName.Set().

Referenced by System.Xml.XmlWellFormedWriter.WriteStartAttribute(), and System.Xml.XmlWellFormedWriter.WriteStartAttributeAsync_NoAdvanceState().