예제 #1
0
 public virtual System.Collections.Generic.IList <Net.Vpc.Upa.Expressions.Expression> FindAll(Net.Vpc.Upa.Expressions.ExpressionFilter filter)
 {
     return(Find(filter, false));
 }
예제 #2
0
 public virtual System.Collections.Generic.IList <Net.Vpc.Upa.Expressions.Expression> Find(Net.Vpc.Upa.Expressions.ExpressionFilter filter, bool firstResult)
 {
     System.Collections.Generic.List <Net.Vpc.Upa.Expressions.Expression> found = new System.Collections.Generic.List <Net.Vpc.Upa.Expressions.Expression>();
     if (filter.Accept(this))
     {
         found.Add(this);
         if (firstResult)
         {
             return(found);
         }
     }
     foreach (Net.Vpc.Upa.Expressions.TaggedExpression r in GetChildren())
     {
         if (firstResult)
         {
             Net.Vpc.Upa.Expressions.Expression x = r.GetExpression().FindOne(filter);
             if (x != null)
             {
                 found.Add(x);
                 return(found);
             }
         }
         else
         {
             Net.Vpc.Upa.FwkConvertUtils.CollectionAddRange(found, r.GetExpression().FindAll(filter));
         }
     }
     return(found);
 }
예제 #3
0
 public virtual Net.Vpc.Upa.Expressions.Expression FindOne(Net.Vpc.Upa.Expressions.ExpressionFilter filter)
 {
     System.Collections.Generic.IList <Net.Vpc.Upa.Expressions.Expression> all = Find(filter, true);
     return((all.Count == 0) ? null : all[0]);
 }