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

◆ MatchesXmlType() [1/4]

bool System.Xml.Xsl.Runtime.XmlQueryRuntime.MatchesXmlType ( IList< XPathItem > seq,
int indexType )
inline

Definition at line 472 of file XmlQueryRuntime.cs.

473 {
474 XmlQueryType xmlType = GetXmlType(indexType);
475 if (!(seq.Count switch
476 {
477 0 => XmlQueryCardinality.Zero,
478 1 => XmlQueryCardinality.One,
479 _ => XmlQueryCardinality.More,
480 } <= xmlType.Cardinality))
481 {
482 return false;
483 }
484 xmlType = xmlType.Prime;
485 for (int i = 0; i < seq.Count; i++)
486 {
487 if (!CreateXmlType(seq[0]).IsSubtypeOf(xmlType))
488 {
489 return false;
490 }
491 }
492 return true;
493 }
XmlQueryType CreateXmlType(XPathItem item)

References System.Xml.Xsl.XmlQueryType.Cardinality, System.Collections.Generic.Dictionary< TKey, TValue >.Count, System.Xml.Xsl.Runtime.XmlQueryRuntime.CreateXmlType(), System.Xml.Xsl.Runtime.XmlQueryRuntime.GetXmlType(), and System.Xml.Xsl.XmlQueryType.Prime.

Referenced by System.Xml.Xsl.Runtime.XmlQueryRuntime.MatchesXmlType().