public virtual Differences VisitQueryGeneratedType(QueryGeneratedType qgt1, QueryGeneratedType qgt2){
      Differences differences = new Differences(qgt1, qgt2);
      if (qgt1 == null || qgt2 == null){
        if (qgt1 != qgt2) differences.NumberOfDifferences++; else differences.NumberOfSimilarities++;
        return differences;
      }
      QueryGeneratedType changes = (QueryGeneratedType)qgt2.Clone();
      QueryGeneratedType deletions = (QueryGeneratedType)qgt2.Clone();
      QueryGeneratedType insertions = (QueryGeneratedType)qgt2.Clone();

      //qgt1.Type;

      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;
    }
Beispiel #2
0
 public virtual Statement VisitQueryGeneratedType(QueryGeneratedType qgt, QueryGeneratedType changes, QueryGeneratedType deletions, QueryGeneratedType insertions){
   this.UpdateSourceContext(qgt, changes);
   if (qgt == null) return changes;
   if (changes != null){
     if (deletions == null || insertions == null)
       Debug.Assert(false);
     else{
     }
   }else if (deletions != null)
     return null;
   return qgt;
 }
Beispiel #3
0
 public virtual Statement VisitQueryGeneratedType(QueryGeneratedType qgt){
   return qgt;
 }
Beispiel #4
0
 public virtual void VisitQueryGeneratedType(QueryGeneratedType qgt){
 }
Beispiel #5
0
 public override Statement VisitQueryGeneratedType(QueryGeneratedType qgt){
   if (qgt == null) return null;
   return base.VisitQueryGeneratedType((QueryGeneratedType)qgt.Clone());
 }
Beispiel #6
0
 public override Statement VisitQueryGeneratedType(QueryGeneratedType qgt) {
   if (qgt == null || qgt.Type == null) return null;
   TypeNode decl = this.currentMethod.DeclaringType;
   decl.Members.Add(qgt.Type);
   qgt.Type.DeclaringType = decl;
   this.VisitTypeNode(qgt.Type);
   return null;
 }
 public EventingVisitor(Action<QueryGeneratedType> visitQueryGeneratedType) { VisitedQueryGeneratedType += visitQueryGeneratedType; } public event Action<QueryGeneratedType> VisitedQueryGeneratedType; public override Statement VisitQueryGeneratedType(QueryGeneratedType qgt) { if (VisitedQueryGeneratedType != null) VisitedQueryGeneratedType(qgt); return base.VisitQueryGeneratedType(qgt); }