System.Xml.Xsl.IlGen.XmlILVisitor.QilConstructorToNodeType C# (CSharp) Method

QilConstructorToNodeType() private method

Map a QilExpression constructor type into the XPathNodeType enumeration.
private QilConstructorToNodeType ( QilNodeType typ ) : XPathNodeType
typ QilNodeType
return XPathNodeType
        private XPathNodeType QilConstructorToNodeType(QilNodeType typ) {
            switch (typ) {
                case QilNodeType.DocumentCtor: return XPathNodeType.Root;
                case QilNodeType.ElementCtor: return XPathNodeType.Element;
                case QilNodeType.TextCtor: return XPathNodeType.Text;
                case QilNodeType.RawTextCtor: return XPathNodeType.Text;
                case QilNodeType.PICtor: return XPathNodeType.ProcessingInstruction;
                case QilNodeType.CommentCtor: return XPathNodeType.Comment;
                case QilNodeType.AttributeCtor: return XPathNodeType.Attribute;
                case QilNodeType.NamespaceDecl: return XPathNodeType.Namespace;
            }

            Debug.Assert(false, "Cannot map QilNodeType " + typ + " to an XPathNodeType");
            return XPathNodeType.All;
        }
XmlILVisitor