Example #1
0
 /// <summary>
 /// Combines three matching predicates, such that every predicate must be satisfied.
 /// </summary>
 /// <param name="fnp">node-level predicate</param>
 /// <param name="fnc1">left child predicate</param>
 /// <param name="fnc2">right child predicate</param>
 public static Expression.MatchFunction Parent2Children(Expression.MatchFunction fnp,
                                                        Expression.MatchFunction fnc1, Expression.MatchFunction fnc2)
 {
     return(x => fnp(x) && fnc1(x.Children.ElementAt(0)) && fnc2(x.Children.ElementAt(1)));
 }
Example #2
0
 /// <summary>
 /// Constructs a new matching.
 /// </summary>
 public Matching()
 {
     _func = x => true;
     _gen  = GetExpression;
 }
 /// <summary>
 /// Constructs a new matching.
 /// </summary>
 public Matching()
 {
     _func = x => true;
     _gen = GetExpression;
 }