public AssemblyDiffCollection GenerateTypeDiff(QueryAggregator queries) { if (queries == null || queries.TypeQueries.Count == 0) { throw new ArgumentNullException("queries is null or contains no queries"); } var typesV1 = queries.ExeuteAndAggregateTypeQueries(this.myV1); var typesV2 = queries.ExeuteAndAggregateTypeQueries(this.myV2); var differ = new ListDiffer<TypeDefinition>(this.ShallowTypeComapare); differ.Diff(typesV1, typesV2, this.OnAddedType, this.OnRemovedType); this.DiffTypes(typesV1, typesV2, queries); return this.myDiff; }
private void DiffTypes(List<TypeDefinition> typesV1, List<TypeDefinition> typesV2, QueryAggregator queries) { TypeDefinition typeV2; foreach (var typeV1 in typesV1) { typeV2 = this.GetTypeByDefinition(typeV1, typesV2); if (typeV2 != null) { var diffed = TypeDiff.GenerateDiff(typeV1, typeV2, queries); if (TypeDiff.None != diffed) { this.myDiff.ChangedTypes.Add(diffed); } } } }