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

◆ FlushElement()

void System.Xml.Linq.StreamingElementWriter.FlushElement ( )
inlineprivate

Definition at line 24 of file StreamingElementWriter.cs.

25 {
26 if (_element == null)
27 {
28 return;
29 }
31 XNamespace @namespace = _element.Name.Namespace;
32 _writer.WriteStartElement(GetPrefixOfNamespace(@namespace, allowDefaultNamespace: true), _element.Name.LocalName, @namespace.NamespaceName);
33 foreach (XAttribute attribute in _attributes)
34 {
35 @namespace = attribute.Name.Namespace;
36 string localName = attribute.Name.LocalName;
37 string namespaceName = @namespace.NamespaceName;
38 _writer.WriteAttributeString(GetPrefixOfNamespace(@namespace, allowDefaultNamespace: false), localName, (namespaceName.Length == 0 && localName == "xmlns") ? "http://www.w3.org/2000/xmlns/" : namespaceName, attribute.Value);
39 }
40 _element = null;
41 _attributes.Clear();
42 }

References System.Xml.Linq.StreamingElementWriter._element, System.Collections.Generic.Dictionary< TKey, TValue >.Clear(), System.Xml.Dictionary, System.Xml.Linq.XName.LocalName, System.Xml.Linq.XStreamingElement.Name, and System.Xml.Linq.StreamingElementWriter.PushElement().