Exemplo n.º 1
0
        private static bool OptimizeFunctionCall(FunctionExpression expression, out IExpression optimized)
        {
            optimized = null;
            var argument = Run(expression.Parameter);

            if (ReferenceEquals(argument, expression.Parameter))
            {
                return(false);
            }

            optimized = new FunctionExpression(expression.Operation, argument);
            return(true);
        }
Exemplo n.º 2
0
 private bool Equals(FunctionExpression other)
 {
     return(Operation == other.Operation && Parameter.Equals(other.Parameter));
 }