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

◆ InsertBefore()

XmlAttribute System.Xml.XmlAttributeCollection.InsertBefore ( XmlAttribute newNode,
XmlAttribute? refNode )
inline

Definition at line 144 of file XmlAttributeCollection.cs.

145 {
146 if (newNode == refNode)
147 {
148 return newNode;
149 }
150 if (refNode == null)
151 {
152 return Append(newNode);
153 }
154 if (refNode.OwnerElement != parent)
155 {
157 }
158 if (newNode.OwnerDocument != null && newNode.OwnerDocument != parent.OwnerDocument)
159 {
161 }
162 if (newNode.OwnerElement != null)
163 {
165 }
166 int num = FindNodeOffset(refNode.LocalName, refNode.NamespaceURI);
168 if (num2 >= 0 && num2 < num)
169 {
170 num--;
171 }
172 InsertNodeAt(num, newNode);
173 return newNode;
174 }
static string Xdom_NamedNode_Context
Definition SR.cs:1286
static string Xdom_AttrCol_Insert
Definition SR.cs:1284
Definition SR.cs:7
int RemoveDuplicateAttribute(XmlAttribute attr)
override XmlNode InsertNodeAt(int i, XmlNode node)
XmlAttribute Append(XmlAttribute node)
int FindNodeOffset(string name)
virtual ? XmlDocument OwnerDocument
Definition XmlNode.cs:109

References System.Xml.XmlAttributeCollection.Append(), System.Xml.ArgumentException, System.Xml.XmlAttributeCollection.Detach(), System.Xml.Dictionary, System.Xml.XmlNamedNodeMap.FindNodeOffset(), System.Xml.XmlAttributeCollection.InsertNodeAt(), System.Xml.XmlNode.OwnerDocument, System.Xml.XmlNamedNodeMap.parent, System.Xml.XmlAttributeCollection.RemoveDuplicateAttribute(), System.SR.Xdom_AttrCol_Insert, and System.SR.Xdom_NamedNode_Context.