public static List <Expression> Search <TExpression>(Expression expression) where TExpression : Expression { var searcher = new ExpressionSearcher(e => e is TExpression); searcher.Visit(expression); return(searcher.nodes.ToList()); }
public static List <Expression> Search(Expression expression, Func <Expression, bool> criteria, Func <Expression, bool> parentExclusionCriteria = null) { var searcher = new ExpressionSearcher(criteria, parentExclusionCriteria); searcher.Visit(expression); return(searcher.nodes.ToList()); }