System.Xml.Xsl.Qil.QilFactory.And C# (CSharp) Method

And() public method

public And ( QilNode left, QilNode right ) : QilBinary
left QilNode
right QilNode
return QilBinary
        public QilBinary And(QilNode left, QilNode right) {
            QilBinary n = new QilBinary(QilNodeType.And, left, right);
            n.XmlType = this.typeCheck.CheckAnd(n);
            TraceNode(n);
            return n;
        }
        

Usage Example

Exemplo n.º 1
0
        public QilNode And(QilNode left, QilNode right)
        {
            CheckLogicArg(left);
            CheckLogicArg(right);

            if (!_debug)
            {
                // True, True => True (right)          other, True => other (left)
                // True, False => False (right)        other, False => False (right)
                // True, other => other (right)        other, other => And
                if (left.NodeType == QilNodeType.True || right.NodeType == QilNodeType.False)
                {
                    return(right);
                }
                if (left.NodeType == QilNodeType.False || right.NodeType == QilNodeType.True)
                {
                    return(left);
                }
            }
            return(_f.And(left, right));
        }