private void ReadPackages() { // add all parts in Left and matching parts in Right foreach (var leftPart in Left.Parts.Values) { Part rightPart = null; Right.Parts.TryGetValue(leftPart.Uri, out rightPart); var diffPart = new DiffPart(leftPart.Uri, leftPart, rightPart, OpenWith.GetCommandsForPart(leftPart)); Parts.Add(diffPart.Uri, diffPart); } // ad all parts in Right not already added foreach (var rightPart in Right.Parts.Values) { // skip parts already added if (Parts.ContainsKey(rightPart.Uri)) { continue; } var diffPart = new DiffPart(rightPart.Uri, left: null, right: rightPart, OpenWith.GetCommandsForPart(rightPart)); Parts.Add(diffPart.Uri, diffPart); } CreateFolders(); }
public DiffPackageItem(DiffData diffData, string path, DiffPart part) { DiffData = diffData ?? throw new ArgumentNullException(nameof(diffData)); Path = path ?? throw new ArgumentNullException(nameof(path)); Part = part; }