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

@@ -65,7 +65,7 @@ namespace SabreTools.Serialization
[Models.Internal.Rom.WordConfidenceInterval71To80Key] = item.WordConfidenceInterval71To80,
[Models.Internal.Rom.WordConfidenceInterval81To90Key] = item.WordConfidenceInterval81To90,
[Models.Internal.Rom.WordConfidenceInterval91To100Key] = item.WordConfidenceInterval91To100,
[Models.Internal.Rom.AlbumKey] = item.Album,
[Models.Internal.Rom.ArtistKey] = item.Artist,
[Models.Internal.Rom.BitrateKey] = item.Bitrate,
@@ -315,5 +315,24 @@ namespace SabreTools.Serialization
}
#endregion
#region DosCenter
/// <summary>
/// Convert from <cref="Models.DosCenter.File"/> to <cref="Models.Internal.Rom"/>
/// </summary>
public static Models.Internal.Rom ConvertFromDosCenter(Models.DosCenter.File item)
{
var rom = new Models.Internal.Rom
{
[Models.Internal.Rom.NameKey] = item.Name,
[Models.Internal.Rom.SizeKey] = item.Size,
[Models.Internal.Rom.CRCKey] = item.CRC,
[Models.Internal.Rom.DateKey] = item.Date,
};
return rom;
}
#endregion
}
}