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

◆ WriteXmlnsAttribute() [1/3]

void System.Runtime.Serialization.XmlWriterDelegator.WriteXmlnsAttribute ( string ns)
inlinepackageinherited

Definition at line 78 of file XmlWriterDelegator.cs.

79 {
80 if (ns == null)
81 {
82 return;
83 }
84 if (ns.Length == 0)
85 {
86 writer.WriteAttributeString("xmlns", string.Empty, null, ns);
87 return;
88 }
89 if (dictionaryWriter != null)
90 {
92 return;
93 }
94 string text = writer.LookupPrefix(ns);
95 if (text == null)
96 {
99 handler.AppendLiteral("d");
100 handler.AppendFormatted(depth);
101 handler.AppendLiteral("p");
102 handler.AppendFormatted(_prefixes);
103 text = string.Create(invariantCulture, ref handler);
104 _prefixes++;
105 writer.WriteAttributeString("xmlns", text, null, ns);
106 }
107 }
static CultureInfo InvariantCulture
virtual void WriteXmlnsAttribute(string? prefix, string namespaceUri)
string? LookupPrefix(string ns)
void WriteAttributeString(string localName, string? ns, string? value)
Definition XmlWriter.cs:46

References System.Runtime.Serialization.XmlWriterDelegator._prefixes, System.Runtime.CompilerServices.DefaultInterpolatedStringHandler.AppendFormatted(), System.Runtime.CompilerServices.DefaultInterpolatedStringHandler.AppendLiteral(), System.Runtime.Serialization.XmlWriterDelegator.depth, System.Runtime.Serialization.Dictionary, System.Runtime.Serialization.XmlWriterDelegator.dictionaryWriter, System.Globalization.CultureInfo.InvariantCulture, System.Xml.XmlWriter.LookupPrefix(), System.text, System.Xml.XmlWriter.WriteAttributeString(), System.Runtime.Serialization.XmlWriterDelegator.writer, and System.Xml.XmlDictionaryWriter.WriteXmlnsAttribute().