Beispiel #1
0
        public static Expression First(Expression expression, Predicate<Expression> isMatch)
        {
            var finder = new ExpressionsFinder(isMatch, true);

            finder.Visit(expression);

            return finder.results.FirstOrDefault();
        }
Beispiel #2
0
        public static bool FindExists(Expression expression, Predicate<Expression> isMatch)
        {
            var finder = new ExpressionsFinder(isMatch, true);

            finder.Visit(expression);

            return finder.results.Count > 0;
        }
Beispiel #3
0
        public static List<Expression> FindAll(Expression expression, Predicate<Expression> isMatch)
        {
            var finder = new ExpressionsFinder(isMatch, false);

            finder.Visit(expression);

            return finder.results;
        }
Beispiel #4
0
        public static List <Expression> FindAll(Expression expression, Predicate <Expression> isMatch)
        {
            var finder = new ExpressionsFinder(isMatch, false);

            finder.Visit(expression);

            return(finder.results);
        }
Beispiel #5
0
        public static Expression First(Expression expression, Predicate <Expression> isMatch)
        {
            var finder = new ExpressionsFinder(isMatch, true);

            finder.Visit(expression);

            return(finder.results.FirstOrDefault());
        }
Beispiel #6
0
        public static bool FindExists(Expression expression, Predicate <Expression> isMatch)
        {
            var finder = new ExpressionsFinder(isMatch, true);

            finder.Visit(expression);

            return(finder.results.Count > 0);
        }