public static Expression EvaluatePartially(Expression expression) { var nominator = new Nominator(); nominator.Visit(expression); var candidates = nominator.Candidates; var evaluator = new SubtreeEvaluator(candidates); return(evaluator.Visit(expression)); }
internal static Expression Eval(HashSet <Expression> candidates, Expression expression, ref int placeholderCount) { if (candidates.Count == 0) { return(expression); } var evaluator = new SubtreeEvaluator(candidates, placeholderCount); var retval = evaluator.Visit(expression); placeholderCount = evaluator.index; return(retval); }
internal static Expression Eval(HashSet <Expression> candidates, Expression expression, ref int placeholderCount) { if (candidates.Count == 0) { return(expression); } var i = placeholderCount >= 0 ? placeholderCount : SqlConstantPlaceholderMaxIndexFinder.Find(expression) + 1; var evaluator = new SubtreeEvaluator(candidates) { index = i }; return(evaluator.Visit(expression)); }
internal static Expression Eval(HashSet<Expression> candidates, Expression expression, ref int placeholderCount) { if (candidates.Count == 0) { return expression; } var i = placeholderCount >= 0 ? placeholderCount : SqlConstantPlaceholderMaxIndexFinder.Find(expression) + 1; var evaluator = new SubtreeEvaluator(candidates) { index = i }; return evaluator.Visit(expression); }
internal static Expression Eval(HashSet<Expression> candidates, Expression expression) { var evalutator = new SubtreeEvaluator(candidates); return evalutator.Visit(expression); }
static internal Expression Eval(HashSet <Expression> candidates, Expression expression) { var evalutator = new SubtreeEvaluator(candidates); return(evalutator.Visit(expression)); }