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

◆ CloseWithAppendAttribute()

void System.Xml.DocumentXmlWriter.CloseWithAppendAttribute ( )
inlineprivate

Definition at line 477 of file DocumentXmlWriter.cs.

478 {
479 XmlElement xmlElement = _start as XmlElement;
480 XmlAttributeCollection attributes = xmlElement.Attributes;
481 for (int i = 0; i < _fragment.Count; i++)
482 {
483 XmlAttribute xmlAttribute = _fragment[i] as XmlAttribute;
484 int num = attributes.FindNodeOffsetNS(xmlAttribute);
485 if (num != -1 && ((XmlAttribute)attributes.nodes[num]).Specified)
486 {
487 throw new XmlException(System.SR.Xml_DupAttributeName, (xmlAttribute.Prefix.Length == 0) ? xmlAttribute.LocalName : (xmlAttribute.Prefix + ":" + xmlAttribute.LocalName));
488 }
489 }
490 for (int j = 0; j < _fragment.Count; j++)
491 {
492 XmlAttribute node = _fragment[j] as XmlAttribute;
493 attributes.Append(node);
494 }
495 }
static string Xml_DupAttributeName
Definition SR.cs:96
Definition SR.cs:7
readonly List< XmlNode > _fragment

References System.Xml.DocumentXmlWriter._fragment, System.Xml.DocumentXmlWriter._start, System.Xml.XmlAttributeCollection.Append(), System.Collections.Generic.Dictionary< TKey, TValue >.Count, System.Xml.Dictionary, System.Xml.XmlAttributeCollection.FindNodeOffsetNS(), System.Xml.XmlNamedNodeMap.nodes, System.SR.Xml_DupAttributeName, and System.Xml.XmlException.

Referenced by System.Xml.DocumentXmlWriter.Close().