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

◆ IsValidChild() [2/2]

bool System.Xml.XPathNodePointer.IsValidChild ( XmlNode parent,
XmlNode child )
inlineprivate

Definition at line 695 of file XPathNodePointer.cs.

696 {
697 int num = s_xmlNodeType_To_XpathNodeType_Map[(int)child.NodeType];
698 if (num == -1)
699 {
700 return false;
701 }
702 return s_xmlNodeType_To_XpathNodeType_Map[(int)parent.NodeType] switch
703 {
704 0 => num == 1 || num == 8 || num == 7,
705 1 => num == 1 || num == 4 || num == 8 || num == 6 || num == 5 || num == 7,
706 _ => false,
707 };
708 }
static readonly int[] s_xmlNodeType_To_XpathNodeType_Map

References System.Xml.Dictionary, System.Xml.XmlNode.NodeType, and System.Xml.XPathNodePointer.s_xmlNodeType_To_XpathNodeType_Map.