NdsForge.NET 1.0.1
Read, validate, edit, compare, and build Nintendo DS and DSi images from .NET
Loading...
Searching...
No Matches
NdsImageDiff.cs
1using System.Collections.ObjectModel;
2
3namespace NdsForge;
4
6public sealed class NdsImageDiff
7{
12 internal NdsImageDiff(string leftImageSha256, string rightImageSha256, IEnumerable<NdsSemanticDifference> differences)
13 {
14 LeftImageSha256 = leftImageSha256;
15 RightImageSha256 = rightImageSha256;
16 Differences = new ReadOnlyCollection<NdsSemanticDifference>(differences
17 .OrderBy(static value => value.Path, StringComparer.Ordinal)
18 .ThenBy(static value => value.Kind)
19 .ToArray());
20 }
21
23 public string LeftImageSha256 { get; }
25 public string RightImageSha256 { get; }
27 public IReadOnlyList<NdsSemanticDifference> Differences { get; }
29 public bool AreEquivalent => Differences.Count == 0;
30}
bool AreEquivalent
Reports whether header, content, identities, and physical layout all compare equal.
string RightImageSha256
Records the full physical SHA-256 identity of the comparison target.
IReadOnlyList< NdsSemanticDifference > Differences
Contains every detected value change in deterministic path order.
string LeftImageSha256
Records the full physical SHA-256 identity of the comparison baseline.