Exemple #1
0
        public static Expression Find(Expression expression, Type type)
        {
            TypedSubtreeFinder finder = new TypedSubtreeFinder(type);

            finder.Visit(expression);
            return(finder.root);
        }
Exemple #2
0
        public static Expression Find(Expression expression, ExpressionType type)
        {
            TypedSubtreeFinder finder = new TypedSubtreeFinder(null)
            {
                expressionType = type
            };

            finder.Visit(expression);
            return(finder.root);
        }