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

◆ InsertNodeAt()

virtual XmlNode System.Xml.XmlNamedNodeMap.InsertNodeAt ( int i,
XmlNode node )
inlinepackagevirtual

Reimplemented in System.Xml.XmlAttributeCollection.

Definition at line 361 of file XmlNamedNodeMap.cs.

362 {
363 XmlNode oldParent = ((node.NodeType != XmlNodeType.Attribute) ? node.ParentNode : ((XmlAttribute)node).OwnerElement);
364 string value = node.Value;
365 XmlNodeChangedEventArgs eventArgs = parent.GetEventArgs(node, oldParent, parent, value, value, XmlNodeChangedAction.Insert);
366 if (eventArgs != null)
367 {
369 }
370 nodes.Insert(i, node);
371 node.SetParent(parent);
372 if (eventArgs != null)
373 {
375 }
376 return node;
377 }
virtual XmlNodeChangedEventArgs GetEventArgs(XmlNode node, XmlNode oldParent, XmlNode newParent, string oldValue, string newValue, XmlNodeChangedAction action)
Definition XmlNode.cs:1239
virtual void AfterEvent(XmlNodeChangedEventArgs args)
Definition XmlNode.cs:1261
virtual void BeforeEvent(XmlNodeChangedEventArgs args)
Definition XmlNode.cs:1253

References System.Xml.XmlNode.AfterEvent(), System.Xml.XmlNode.BeforeEvent(), System.Xml.Dictionary, System.Xml.XmlNode.GetEventArgs(), System.Xml.XmlNamedNodeMap.SmallXmlNodeList.Insert(), System.Xml.XmlNamedNodeMap.nodes, System.Xml.XmlNamedNodeMap.parent, and System.value.

Referenced by System.Xml.XmlNamedNodeMap.ReplaceNodeAt().