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

◆ KeepXmlnsDeclarations()

bool System.Xml.Serialization.XmlSchemaImporter.KeepXmlnsDeclarations ( XmlSchemaType type,
out string xmlnsMemberName )
inlineprivate

Definition at line 1536 of file XmlSchemaImporter.cs.

1537 {
1538 xmlnsMemberName = null;
1539 if (type.Annotation == null)
1540 {
1541 return false;
1542 }
1543 if (type.Annotation.Items == null || type.Annotation.Items.Count == 0)
1544 {
1545 return false;
1546 }
1547 foreach (XmlSchemaObject item in type.Annotation.Items)
1548 {
1549 if (!(item is XmlSchemaAppInfo))
1550 {
1551 continue;
1552 }
1553 XmlNode[] markup = ((XmlSchemaAppInfo)item).Markup;
1554 if (markup == null || markup.Length == 0)
1555 {
1556 continue;
1557 }
1558 XmlNode[] array = markup;
1559 foreach (XmlNode xmlNode in array)
1560 {
1561 if (!(xmlNode is XmlElement))
1562 {
1563 continue;
1564 }
1565 XmlElement xmlElement = (XmlElement)xmlNode;
1566 if (xmlElement.Name == "keepNamespaceDeclarations")
1567 {
1568 if (xmlElement.LastNode is XmlText)
1569 {
1570 xmlnsMemberName = ((XmlText)xmlElement.LastNode).Value.Trim(null);
1571 }
1572 return true;
1573 }
1574 }
1575 }
1576 return false;
1577 }

References System.array, System.Xml.Dictionary, System.item, System.type, and System.Xml.XmlText.

Referenced by System.Xml.Serialization.XmlSchemaImporter.ImportXmlnsDeclarationsMember().