Пример #1
0
        public object Eval(System.Linq.Expressions.Expression exp)
        {
            if (exp.NodeType == ExpressionType.Constant)
            {
                return ((ConstantExpression)exp).Value;
            }

            var parameters = new ConstantExtractor().Extract(exp);
            var func = this.m_cache.Get(exp, this.m_creatorDelegate);
            return func(parameters);
        }
Пример #2
0
        public object Eval(System.Linq.Expressions.Expression exp)
        {
            if (exp.NodeType == ExpressionType.Constant)
            {
                return(((ConstantExpression)exp).Value);
            }

            var parameters = new ConstantExtractor().Extract(exp);
            var func       = this.m_cache.Get(exp, this.m_creatorDelegate);

            return(func(parameters));
        }