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

◆ ToXmlQualifiedName() [1/2]

XmlQualifiedName System.Xml.Serialization.XmlSerializationReader.ToXmlQualifiedName ( string value,
bool decodeName )
inlinepackage

Definition at line 1365 of file XmlSerializationReader.cs.

1366 {
1367 int num = value?.LastIndexOf(':') ?? (-1);
1368 string text = ((num < 0) ? null : value.Substring(0, num));
1369 string text2 = value.Substring(num + 1);
1370 if (decodeName)
1371 {
1372 text = XmlConvert.DecodeName(text);
1373 text2 = XmlConvert.DecodeName(text2);
1374 }
1375 if (text == null || text.Length == 0)
1376 {
1377 return new XmlQualifiedName(_r.NameTable.Add(value), _r.LookupNamespace(string.Empty));
1378 }
1379 string text3 = _r.LookupNamespace(text);
1380 if (text3 == null)
1381 {
1383 }
1384 return new XmlQualifiedName(_r.NameTable.Add(text2), text3);
1385 }
static string XmlUndefinedAlias
Definition SR.cs:1640
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
Definition SR.cs:7
string Add(char[] array, int offset, int length)
string? LookupNamespace(string prefix)
XmlNameTable NameTable
Definition XmlReader.cs:116

References System.Xml.Serialization.XmlSerializationReader._r, System.Xml.XmlNameTable.Add(), System.Xml.XmlConvert.DecodeName(), System.SR.Format(), System.Xml.XmlReader.LookupNamespace(), System.Xml.XmlReader.NameTable, System.text, System.value, and System.SR.XmlUndefinedAlias.