Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/nes-containers.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2021-04-23 03:57:30 +0300
committerAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2021-04-23 03:57:30 +0300
commit526245c8e1298eb0a5cfee0e929f054cf8033158 (patch)
tree2e8b6398f9b21e7576b0b20566f2caae3b99dd40 /FdsBlockFileHeader.cs
parent3eeeea564cd5446d3692c16af8c0d19ec674d127 (diff)
FDS blocks are IEquatable now
Diffstat (limited to 'FdsBlockFileHeader.cs')
-rw-r--r--FdsBlockFileHeader.cs7
1 files changed, 6 insertions, 1 deletions
diff --git a/FdsBlockFileHeader.cs b/FdsBlockFileHeader.cs
index dc11ed4..e005642 100644
--- a/FdsBlockFileHeader.cs
+++ b/FdsBlockFileHeader.cs
@@ -9,7 +9,7 @@ using System.Threading.Tasks;
namespace com.clusterrr.Famicom.Containers
{
[StructLayout(LayoutKind.Sequential, Size = 18, Pack = 1, CharSet = CharSet.Ansi)]
- public class FdsBlockFileHeader : IFdsBlock
+ public class FdsBlockFileHeader : IFdsBlock, IEquatable<FdsBlockFileHeader>
{
public enum Kind
{
@@ -103,5 +103,10 @@ namespace com.clusterrr.Famicom.Containers
}
public override string ToString() => $"{FileName} ({FileKind})";
+
+ public bool Equals(FdsBlockFileHeader other)
+ {
+ return Enumerable.SequenceEqual(this.ToBytes(), other.ToBytes());
+ }
}
}