public virtual Differences VisitQueryAxis(QueryAxis axis1, QueryAxis axis2){
      Differences differences = new Differences(axis1, axis2);
      if (axis1 == null || axis2 == null){
        if (axis1 != axis2) differences.NumberOfDifferences++; else differences.NumberOfSimilarities++;
        return differences;
      }
      QueryAxis changes = (QueryAxis)axis2.Clone();
      QueryAxis deletions = (QueryAxis)axis2.Clone();
      QueryAxis insertions = (QueryAxis)axis2.Clone();

      //      axis1.AccessPlan;
      //      axis1.Cardinality;
      //      axis1.IsCyclic;
      //      axis1.IsDescendant;
      //      axis1.IsIterative;
      //      axis1.Name;
      //      axis1.Namespace;

      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;
    }
Esempio n. 2
0
 public override Node VisitQueryAxis(QueryAxis axis){
   if (axis == null) return null;
   return base.VisitQueryAxis((QueryAxis)axis.Clone());
 }