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));
        }
Пример #2
0
            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);
            }
Пример #3
0
            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));
            }
Пример #4
0
			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);
			}
Пример #5
0
            internal static Expression Eval(HashSet<Expression> candidates, Expression expression)
            {
                var evalutator = new SubtreeEvaluator(candidates);

                return evalutator.Visit(expression);
            }
Пример #6
0
            static internal Expression Eval(HashSet <Expression> candidates, Expression expression)
            {
                var evalutator = new SubtreeEvaluator(candidates);

                return(evalutator.Visit(expression));
            }