Exemplo n.º 1
0
            internal static HashSet <Expression> Nominate(Expression expression)
            {
                Nominator nominator = new Nominator();

                nominator.Visit(expression);
                return(nominator.candidates);
            }
Exemplo n.º 2
0
            public static HashSet <Expression> Nominate(Expression node)
            {
                var nominator = new Nominator();

                nominator.Visit(node);
                return(nominator._candidates);
            }
Exemplo n.º 3
0
            internal static HashSet <Expression> Nominate(QueryLanguage language, ProjectionAffinity affinity, Expression expression)
            {
                Nominator nominator = new Nominator(language, affinity);

                nominator.Visit(expression);
                return(nominator.candidates);
            }
Exemplo n.º 4
0
            public static HashSet <Expression> Nominate(Expression expression, Func <Expression, bool> fnCanBeEvaluated)
            {
                var visitor = new Nominator(fnCanBeEvaluated);

                visitor.Visit(expression);
                return(visitor.candidates);
            }
Exemplo n.º 5
0
            internal static HashSet <Expression> Nominate(QueryLanguage language, Expression expression)
            {
                Nominator nominator = new Nominator(language);

                nominator.Visit(expression);
                return(nominator.candidates);
            }
Exemplo n.º 6
0
            internal static HashSet <Expression> Nominate(Func <Expression, bool> fnCanBeColumn, Expression expression)
            {
                var nominator = new Nominator(fnCanBeColumn);

                nominator.Visit(expression);
                return(nominator.candidates);
            }
Exemplo n.º 7
0
            internal static HashSet <Expression> Nominate(Func <Expression, bool> fnCanBeEvaluated, Expression expression)
            {
                Nominator nominator = new Nominator(fnCanBeEvaluated);

                nominator.Visit(expression);
                return(nominator.candidates);
            }
Exemplo n.º 8
0
            public static HashSet <Expression> Nominate(Func <Expression, bool> canBeEvaluated, Expression expression)
            {
                Nominator nominator = new Nominator(canBeEvaluated);

                nominator.Visit(expression);
                return(nominator._candidates);
            }
        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));
        }
Exemplo n.º 10
0
            public static HashSet <Expression> Nominate(QueryLanguage language, Expression expression)
            {
                var nominator = new Nominator(language);

                if (nominator != null)
                {
                    nominator.Visit(expression);
                }

                return(nominator.candidates);
            }
Exemplo n.º 11
0
 public static Expression Simplify(Expression expression)
 {
     if (expression.NodeType == ExpressionType.Constant)
         return expression;
     var nominator = new Nominator();
     nominator.Visit(expression);
     if (nominator.mayBeEvaluated.Count == 0) // no possible evaluations
         return expression;
     var ret = new Evaluator(nominator.mayBeEvaluated).Visit(expression);
     return ret;
 }
Exemplo n.º 12
0
        public static Expression Simplify(Expression expression)
        {
            if (expression.NodeType == ExpressionType.Constant)
            {
                return(expression);
            }
            var nominator = new Nominator();

            nominator.Visit(expression);
            if (nominator.mayBeEvaluated.Count == 0) // no possible evaluations
            {
                return(expression);
            }
            var ret = new Evaluator(nominator.mayBeEvaluated).Visit(expression);

            return(ret);
        }
Exemplo n.º 13
0
 internal static HashSet<Expression> Nominate(Func<Expression, bool> fnCanBeEvaluated, Expression expression)
 {
     Nominator nominator = new Nominator(fnCanBeEvaluated);
     nominator.Visit(expression);
     return nominator.candidates;
 }
Exemplo n.º 14
0
 public static HashSet<Expression> Nominate(Func<Expression, bool> canBeEvaluated, Expression expression)
 {
     Nominator nominator = new Nominator(canBeEvaluated);
     nominator.Visit(expression);
     return nominator._candidates;
 }
Exemplo n.º 15
0
 public static HashSet<Expression> Nominate(Expression node)
 {
     var nominator = new Nominator();
     nominator.Visit(node);
     return nominator._candidates;
 }
 internal static HashSet<Expression> Nominate(QueryLanguage language, Expression expression)
 {
     Nominator nominator = new Nominator(language);
     nominator.Visit(expression);
     return nominator.candidates;
 }
			internal static HashSet<Expression> Nominate(Expression expression)
			{
				Nominator nominator = new Nominator();
				nominator.Visit(expression);
				return nominator.candidates;
			}