Add DosCenter internal converters

This commit is contained in:
Matt Nadareski
2023-08-04 09:54:36 -04:00
parent 405fdc75d5
commit 16e2da93b3
3 changed files with 40 additions and 2 deletions

View File

@@ -314,5 +314,24 @@ namespace SabreTools.Serialization
}
#endregion
#region DosCenter
/// <summary>
/// Convert from <cref="Models.Internal.Rom"/> to <cref="Models.DosCenter.File"/>
/// </summary>
public static Models.DosCenter.File ConvertToDosCenter(Models.Internal.Rom item)
{
var rom = new Models.DosCenter.File
{
Name = item.ReadString(Models.Internal.Rom.NameKey),
Size = item.ReadString(Models.Internal.Rom.SizeKey),
CRC = item.ReadString(Models.Internal.Rom.CRCKey),
Date = item.ReadString(Models.Internal.Rom.DateKey),
};
return rom;
}
#endregion
}
}