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

◆ ChooseBestType()

XmlQueryType System.Xml.Xsl.Xslt.QilGenerator.ChooseBestType ( VarPar var)
inlineprivate

Definition at line 402 of file QilGenerator.cs.

403 {
404 if (IsDebug || !InferXPathTypes)
405 {
406 return XmlQueryTypeFactory.ItemS;
407 }
408 return (var.Flags & XslFlags.TypeFilter) switch
409 {
410 XslFlags.String => XmlQueryTypeFactory.StringX,
411 XslFlags.Number => XmlQueryTypeFactory.DoubleX,
412 XslFlags.Boolean => XmlQueryTypeFactory.BooleanX,
413 XslFlags.Node => XmlQueryTypeFactory.NodeNotRtf,
414 XslFlags.Nodeset => XmlQueryTypeFactory.NodeNotRtfS,
415 XslFlags.Rtf => XmlQueryTypeFactory.Node,
416 XslFlags.Node | XslFlags.Rtf => XmlQueryTypeFactory.Node,
417 XslFlags.Node | XslFlags.Nodeset => XmlQueryTypeFactory.NodeNotRtfS,
418 XslFlags.Nodeset | XslFlags.Rtf => XmlQueryTypeFactory.NodeS,
419 XslFlags.Node | XslFlags.Nodeset | XslFlags.Rtf => XmlQueryTypeFactory.NodeS,
420 _ => XmlQueryTypeFactory.ItemS,
421 };
422 }

References System.Xml.Xsl.XmlQueryTypeFactory.BooleanX, System.Xml.Dictionary, System.Xml.Xsl.XmlQueryTypeFactory.DoubleX, System.Xml.Xsl.Xslt.QilGenerator.InferXPathTypes, System.Xml.Xsl.Xslt.QilGenerator.IsDebug, System.Xml.Xsl.XmlQueryTypeFactory.ItemS, System.Xml.Xsl.XmlQueryTypeFactory.Node, System.Xml.Xsl.XmlQueryTypeFactory.NodeNotRtf, System.Xml.Xsl.XmlQueryTypeFactory.NodeNotRtfS, System.Xml.Xsl.XmlQueryTypeFactory.NodeS, and System.Xml.Xsl.XmlQueryTypeFactory.StringX.

Referenced by System.Xml.Xsl.Xslt.QilGenerator.CreateGlobalVarPar(), and System.Xml.Xsl.Xslt.QilGenerator.PrecompileProtoTemplatesHeaders().