Esempio n. 1
0
        public static bool Evaluate(this BinaryOperator op, bool left, bool right)
        {
            var leftVal  = op.CheckNecessaryLeft() && left;
            var rightVal = op.CheckNecessaryRight() && right;

            var val = 0b1;

            if (leftVal)
            {
                val = val << 2;
            }
            if (rightVal)
            {
                val = val << 1;
            }
            return(((int)op & val) != 0);
        }