public virtual Differences VisitAssemblyReference(AssemblyReference/*!*/ assemblyReference1, AssemblyReference assemblyReference2) {
      Differences differences = new Differences(assemblyReference1, assemblyReference2);
      if (assemblyReference1 == null || assemblyReference2 == null){
        if (assemblyReference1 != assemblyReference2) differences.NumberOfDifferences++; else differences.NumberOfSimilarities++;
        return differences;
      }
      AddressDereference changes = (AddressDereference)assemblyReference2.Clone();
      AddressDereference deletions = (AddressDereference)assemblyReference2.Clone();
      AddressDereference insertions = (AddressDereference)assemblyReference2.Clone();

      if (assemblyReference1.Culture == assemblyReference2.Culture) differences.NumberOfSimilarities++; else differences.NumberOfDifferences++;
      if (assemblyReference1.Flags == assemblyReference2.Flags) differences.NumberOfSimilarities++; else differences.NumberOfDifferences++;
      if (assemblyReference1.Name == assemblyReference2.Name) differences.NumberOfSimilarities++; else differences.NumberOfDifferences++;
      if (this.ValuesAreEqual(assemblyReference1.PublicKeyOrToken, assemblyReference2.PublicKeyOrToken)) differences.NumberOfSimilarities++; else differences.NumberOfDifferences++;
      if (assemblyReference1.Version == assemblyReference2.Version) differences.NumberOfSimilarities++; else differences.NumberOfDifferences++;

      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 override AssemblyReference VisitAssemblyReference(AssemblyReference assemblyReference)
 {
     if (assemblyReference == null) return null;
     return base.VisitAssemblyReference((AssemblyReference)assemblyReference.Clone());
 }