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

◆ WriteAttribute() [2/5]

void System.Xml.Serialization.XmlSerializationWriter.WriteAttribute ( string localName,
string ns,
byte?[] value )
inlineprotected

Definition at line 1083 of file XmlSerializationWriter.cs.

1084 {
1085 if (value == null || !(localName != "xmlns") || localName.StartsWith("xmlns:", StringComparison.Ordinal))
1086 {
1087 return;
1088 }
1089 int num = localName.IndexOf(':');
1090 if (num < 0)
1091 {
1092 if (ns == "http://www.w3.org/XML/1998/namespace")
1093 {
1094 string text = _w.LookupPrefix(ns);
1095 if (text == null || text.Length == 0)
1096 {
1097 text = "xml";
1098 }
1099 _w.WriteStartAttribute("xml", localName, ns);
1100 }
1101 else
1102 {
1103 _w.WriteStartAttribute(null, localName, ns);
1104 }
1105 }
1106 else
1107 {
1108 string prefix = _w.LookupPrefix(ns);
1109 _w.WriteStartAttribute(prefix, localName.Substring(num + 1), ns);
1110 }
1111 XmlCustomFormatter.WriteArrayBase64(_w, value, 0, value.Length);
1113 }
string? LookupPrefix(string ns)
void WriteStartAttribute(string localName, string? ns)
Definition XmlWriter.cs:67

References System.Xml.Serialization.XmlSerializationWriter._w, System.Xml.XmlWriter.LookupPrefix(), System.prefix, System.text, System.value, System.Xml.Serialization.XmlCustomFormatter.WriteArrayBase64(), System.Xml.XmlWriter.WriteEndAttribute(), and System.Xml.XmlWriter.WriteStartAttribute().