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

◆ MatchesXmlType() [4/4]

bool System.Xml.Xsl.Runtime.XmlQueryRuntime.MatchesXmlType ( XPathItem item,
XmlTypeCode code )
inline

Definition at line 509 of file XmlQueryRuntime.cs.

510 {
511 if (code > XmlTypeCode.AnyAtomicType)
512 {
513 if (!item.IsNode)
514 {
515 return item.XmlType.TypeCode == code;
516 }
517 return false;
518 }
519 switch (code)
520 {
521 case XmlTypeCode.AnyAtomicType:
522 return !item.IsNode;
523 case XmlTypeCode.Node:
524 return item.IsNode;
525 case XmlTypeCode.Item:
526 return true;
527 default:
528 if (!item.IsNode)
529 {
530 return false;
531 }
532 return ((XPathNavigator)item).NodeType switch
533 {
534 XPathNodeType.Root => code == XmlTypeCode.Document,
541 XPathNodeType.ProcessingInstruction => code == XmlTypeCode.ProcessingInstruction,
543 _ => false,
544 };
545 }
546 }

References System.Xml.Dictionary, and System.item.