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

◆ PushAncestors()

void System.Xml.Linq.ElementWriter.PushAncestors ( XElement e)
inlineprivate

Definition at line 126 of file ElementWriter.cs.

127 {
128 while (true)
129 {
130 e = e.parent as XElement;
131 if (e == null)
132 {
133 break;
134 }
135 XAttribute xAttribute = e.lastAttr;
136 if (xAttribute == null)
137 {
138 continue;
139 }
140 do
141 {
142 xAttribute = xAttribute.next;
143 if (xAttribute.IsNamespaceDeclaration)
144 {
145 _resolver.AddFirst((xAttribute.Name.NamespaceName.Length == 0) ? string.Empty : xAttribute.Name.LocalName, XNamespace.Get(xAttribute.Value));
146 }
147 }
148 while (xAttribute != e.lastAttr);
149 }
150 }
void AddFirst(string prefix, XNamespace ns)

References System.Xml.Linq.ElementWriter._resolver, System.Xml.Linq.NamespaceResolver.AddFirst(), System.Xml.Dictionary, System.Xml.Linq.XNamespace.Get(), System.Xml.Linq.XElement.lastAttr, and System.Xml.Linq.XAttribute.next.

Referenced by System.Xml.Linq.ElementWriter.WriteElement(), and System.Xml.Linq.ElementWriter.WriteElementAsync().