Remove nearly all explict fields

This commit is contained in:
Matt Nadareski
2024-03-09 21:34:26 -05:00
parent c755abf4c0
commit 24d4e352a4
79 changed files with 1723 additions and 3554 deletions

View File

@@ -107,27 +107,27 @@ namespace SabreTools.DatFiles.Formats
foreach (var rom in games.Rom)
{
var machine = new Machine
{
Name = rom.GameName,
Description = rom.GameDescription,
CloneOf = rom.ParentName,
//CloneOfDescription = rom.ParentDescription, // TODO: Add to internal model or find mapping
RomOf = rom.RomOf,
};
var item = new Rom
{
Size = NumberHelper.ConvertToInt64(rom.RomSize),
CRC = rom.RomCRC,
MergeTag = rom.MergeName,
ItemStatus = ItemStatus.None,
Machine = new Machine
{
Name = rom.GameName,
Description = rom.GameDescription,
CloneOf = rom.ParentName,
//CloneOfDescription = rom.ParentDescription, // TODO: Add to internal model or find mapping
RomOf = rom.RomOf,
},
Source = new Source { Index = indexId, Name = filename },
};
item.SetName(rom.RomName);
item.SetFieldValue<string?>(Models.Metadata.Rom.CRCKey, rom.RomCRC);
item.SetFieldValue<string?>(Models.Metadata.Rom.MergeKey, rom.MergeName);
item.SetFieldValue<long?>(Models.Metadata.Rom.SizeKey, NumberHelper.ConvertToInt64(rom.RomSize));
item.SetFieldValue<ItemStatus>(Models.Metadata.Rom.StatusKey, ItemStatus.None);
// Now process and add the item
item.CopyMachineInformation(machine);
ParseAddHelper(item, statsOnly);
}
}