Exemple #1
0
        public void SerializeBoolAndExpression()
        {
            var num = new LiteralExpression(1);
            var a   = new BoolAndExpression(num, num);
            var b   = Reserialize(a);

            Assert.AreEqual(a, b);
        }
Exemple #2
0
        private object And(object l, object r)
        {
            var scope = new Scope();

            scope.SetVar("l", l);
            scope.SetVar("r", r);

            var exp = new BoolAndExpression(
                new VariableExpression("l"),
                new VariableExpression("r")
                );

            return(exp.Evaluate(scope, new Bindings()).AsObject());
        }