Пример #1
0
            public override bool Relate(string function, object[] predicates)
            {
                if (evaluator == null)
                {
                    evaluator = Compilation.NewEvaluator(expression,
                                                         Formula.DEFAULT_EXPRESSION_PLACEHOLDER,
                                                         variableNames,
                                                         predicates);
                }

                return(Convert.ToBoolean(evaluator.Run(predicates)));;
            }
Пример #2
0
            public override bool Evaluate(object predicate, string function, string[] arguments)
            {
                if (evaluator == null)
                {
                    evaluator = Compilation.NewEvaluator(expression,
                                                         Formula.DEFAULT_EXPRESSION_PLACEHOLDER,
                                                         variableNames,
                                                         new object[] { predicate });
                }

                return(Convert.ToBoolean(evaluator.Run(new object[] { predicate })));
            }