[DatFile, DatItem] Make items cloneable, fix nonmerged output again

This commit is contained in:
Matt Nadareski
2017-01-09 14:37:41 -08:00
parent 9403277551
commit 4b211c4597
9 changed files with 250 additions and 58 deletions

View File

@@ -4,7 +4,7 @@ using SabreTools.Helper.Data;
namespace SabreTools.Helper.Dats
{
public class Disk : DatItem
public class Disk : DatItem, ICloneable
{
#region Private instance variables
@@ -52,6 +52,40 @@ namespace SabreTools.Helper.Dats
#endregion
#region Cloning Methods
public object Clone()
{
return new Disk()
{
Name = this.Name,
Type = this.Type,
Dupe = this.Dupe,
Machine = this.Machine,
Supported = this.Supported,
Publisher = this.Publisher,
Infos = this.Infos,
PartName = this.PartName,
PartInterface = this.PartInterface,
Features = this.Features,
AreaName = this.AreaName,
AreaSize = this.AreaSize,
SystemID = this.SystemID,
System = this.System,
SourceID = this.SourceID,
Source = this.Source,
MD5 = this.MD5,
SHA1 = this.SHA1,
ItemStatus = this.ItemStatus,
};
}
#endregion
#region Comparision Methods
public override bool Equals(DatItem other)