コード例 #1
0
        private Predicate<double> GetCondition(string expression)
        {
            if (string.IsNullOrWhiteSpace(expression))
                return null;

            var interpreter = new DynamicExpresso.Interpreter();

            var func = interpreter.Parse<Predicate<double>>(expression, "value");

            return func;
        }
コード例 #2
0
        private Func<double, double> GetTransform(string expression)
        {
            if (string.IsNullOrWhiteSpace(expression))
                return null;

            var interpreter = new DynamicExpresso.Interpreter();

            var func = interpreter.Parse<Func<double, double>>(expression, "value");

            return func;
        }