And() публичный Метод

public And ( QilNode left, QilNode right ) : QilBinary
left QilNode
right QilNode
Результат QilBinary
Пример #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));
        }