Пример #1
0
    public virtual Differences VisitQueryFilter(QueryFilter filter1, QueryFilter filter2){
      Differences differences = new Differences(filter1, filter2);
      if (filter1 == null || filter2 == null){
        if (filter1 != filter2) differences.NumberOfDifferences++; else differences.NumberOfSimilarities++;
        return differences;
      }
      QueryFilter changes = (QueryFilter)filter2.Clone();
      QueryFilter deletions = (QueryFilter)filter2.Clone();
      QueryFilter insertions = (QueryFilter)filter2.Clone();

      //      filter1.Context;
      //      filter1.Expression;
      //      filter1.Source;

      if (differences.NumberOfDifferences == 0){
        differences.Changes = null;
        differences.Deletions = null;
        differences.Insertions = null;
      }else{
        differences.Changes = changes;
        differences.Deletions = deletions;
        differences.Insertions = insertions;
      }
      return differences;
    }
Пример #2
0
 public override Node VisitQueryFilter(QueryFilter filter){
   if (filter == null) return null;
   return base.VisitQueryFilter((QueryFilter)filter.Clone());
 }