Beispiel #1
0
        protected void ApiChangesDetermined()
        {
            using (var assembly1Stream = File.Open(OldAssemblyPath, FileMode.Open))
                using (var assembly2Stream = File.Open(NewAssemblyPath, FileMode.Open))
                {
                    var changeBuilder = new AssemblyChangesBuilder();

                    AssemblyChanges = changeBuilder.GetChanges(assembly1Stream, assembly2Stream);
                }
        }
Beispiel #2
0
        private static IEnumerable <BreakingChange> CompareAssemblies(string oldAssemblyPath, string newAssemblyPath)
        {
            using (var oldAssembly = File.Open(oldAssemblyPath, FileMode.Open))
                using (var newAssembly = File.Open(newAssemblyPath, FileMode.Open))
                {
                    var             changesBuilder = new AssemblyChangesBuilder();
                    AssemblyChanges changes        = changesBuilder.GetChanges(oldAssembly, newAssembly);

                    var breakingChangeVisitor = new BreakingChangeVisitor();
                    changes.Visit(breakingChangeVisitor);

                    return(breakingChangeVisitor.BreakingChanges);
                }
        }
Beispiel #3
0
 public static AssemblyChanges GetChanges(this AssemblyChangesBuilder changeBuilder, Stream olderAssemblyStream, Stream newerAssemblyStream)
 {
     return(changeBuilder.GetChanges(
                AssemblyDefinition.ReadAssembly(olderAssemblyStream),
                AssemblyDefinition.ReadAssembly(newerAssemblyStream)));
 }