mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Fix JSON read/write, XML write
This commit is contained in:
@@ -18,13 +18,13 @@ namespace SabreTools.Library.DatItems
|
||||
/// <summary>
|
||||
/// Description of the BIOS
|
||||
/// </summary>
|
||||
[JsonProperty("description")]
|
||||
[JsonProperty("description", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Determine whether the BIOS is default
|
||||
/// </summary>
|
||||
[JsonProperty("default")]
|
||||
[JsonProperty("default", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public bool? Default { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -62,13 +62,13 @@ namespace SabreTools.Library.DatItems
|
||||
/// <summary>
|
||||
/// Alternate name for the item
|
||||
/// </summary>
|
||||
[JsonProperty("alt_romname")]
|
||||
[JsonProperty("alt_romname", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string AltName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Alternate title for the item
|
||||
/// </summary>
|
||||
[JsonProperty("alt_title")]
|
||||
[JsonProperty("alt_title", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string AltTitle { get; set; }
|
||||
|
||||
#endregion
|
||||
@@ -78,13 +78,13 @@ namespace SabreTools.Library.DatItems
|
||||
/// <summary>
|
||||
/// OpenMSX sub item type
|
||||
/// </summary>
|
||||
[JsonProperty("original")]
|
||||
[JsonProperty("original", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public OpenMSXOriginal Original { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// OpenMSX sub item type
|
||||
/// </summary>
|
||||
[JsonProperty("openmsx_subtype")]
|
||||
[JsonProperty("openmsx_subtype", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public OpenMSXSubType OpenMSXSubType { get; set; }
|
||||
|
||||
@@ -92,19 +92,19 @@ namespace SabreTools.Library.DatItems
|
||||
/// OpenMSX sub item type
|
||||
/// </summary>
|
||||
/// <remarks>Not related to the subtype above</remarks>
|
||||
[JsonProperty("openmsx_type")]
|
||||
[JsonProperty("openmsx_type", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string OpenMSXType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Item remark (like a comment)
|
||||
/// </summary>
|
||||
[JsonProperty("remark")]
|
||||
[JsonProperty("remark", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string Remark { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Boot state
|
||||
/// </summary>
|
||||
[JsonProperty("boot")]
|
||||
[JsonProperty("boot", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string Boot { get; set; }
|
||||
|
||||
#endregion
|
||||
@@ -114,58 +114,58 @@ namespace SabreTools.Library.DatItems
|
||||
/// <summary>
|
||||
/// Original hardware part associated with the item
|
||||
/// </summary>
|
||||
[JsonProperty("partname")]
|
||||
[JsonProperty("partname", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string PartName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Original hardware interface associated with the item
|
||||
/// </summary>
|
||||
[JsonProperty("partinterface")]
|
||||
[JsonProperty("partinterface", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string PartInterface { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Features provided to/by the item
|
||||
/// </summary>
|
||||
[JsonProperty("features")]
|
||||
[JsonProperty("features", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public List<SoftwareListFeature> Features { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Original hardware part name within an item
|
||||
/// </summary>
|
||||
[JsonProperty("areaname")]
|
||||
[JsonProperty("areaname", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string AreaName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Original hardware size within the part
|
||||
/// </summary>
|
||||
[JsonProperty("areasize")]
|
||||
[JsonProperty("areasize", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public long? AreaSize { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Width of the data area in bytes
|
||||
/// </summary>
|
||||
/// TODO: Convert to Int32
|
||||
[JsonProperty("width")]
|
||||
[JsonProperty("width", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string AreaWidth { get; set; } // (8|16|32|64) "8"
|
||||
|
||||
/// <summary>
|
||||
/// Endianness of the data area
|
||||
/// </summary>
|
||||
/// TODO: Convert to Enum?
|
||||
[JsonProperty("endianness")]
|
||||
[JsonProperty("endianness", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string AreaEndianness { get; set; } // (big|little) "little"
|
||||
|
||||
/// <summary>
|
||||
/// SoftwareList value associated with the item
|
||||
/// </summary>
|
||||
[JsonProperty("value")]
|
||||
[JsonProperty("value", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string Value { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Loading flag
|
||||
/// </summary>
|
||||
/// TODO: Convert to Enum?
|
||||
[JsonProperty("loadflag")]
|
||||
[JsonProperty("loadflag", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string LoadFlag { get; set; } // (load16_byte|load16_word|load16_word_swap|load32_byte|load32_word|load32_word_swap|load32_dword|load64_word|load64_word_swap|reload|fill|continue|reload_plain|ignore)
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace SabreTools.Library.DatItems
|
||||
/// <summary>
|
||||
/// Data MD5 hash
|
||||
/// </summary>
|
||||
[JsonProperty("md5")]
|
||||
[JsonProperty("md5", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string MD5
|
||||
{
|
||||
get { return _md5.IsNullOrEmpty() ? null : Utilities.ByteArrayToString(_md5); }
|
||||
@@ -44,7 +44,7 @@ namespace SabreTools.Library.DatItems
|
||||
/// <summary>
|
||||
/// Data RIPEMD160 hash
|
||||
/// </summary>
|
||||
[JsonProperty("ripemd160")]
|
||||
[JsonProperty("ripemd160", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string RIPEMD160
|
||||
{
|
||||
get { return _ripemd160.IsNullOrEmpty() ? null : Utilities.ByteArrayToString(_ripemd160); }
|
||||
@@ -55,7 +55,7 @@ namespace SabreTools.Library.DatItems
|
||||
/// <summary>
|
||||
/// Data SHA-1 hash
|
||||
/// </summary>
|
||||
[JsonProperty("sha1")]
|
||||
[JsonProperty("sha1", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string SHA1
|
||||
{
|
||||
get { return _sha1.IsNullOrEmpty() ? null : Utilities.ByteArrayToString(_sha1); }
|
||||
@@ -65,7 +65,7 @@ namespace SabreTools.Library.DatItems
|
||||
/// <summary>
|
||||
/// Data SHA-256 hash
|
||||
/// </summary>
|
||||
[JsonProperty("sha256")]
|
||||
[JsonProperty("sha256", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string SHA256
|
||||
{
|
||||
get { return _sha256.IsNullOrEmpty() ? null : Utilities.ByteArrayToString(_sha256); }
|
||||
@@ -75,7 +75,7 @@ namespace SabreTools.Library.DatItems
|
||||
/// <summary>
|
||||
/// Data SHA-384 hash
|
||||
/// </summary>
|
||||
[JsonProperty("sha384")]
|
||||
[JsonProperty("sha384", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string SHA384
|
||||
{
|
||||
get { return _sha384.IsNullOrEmpty() ? null : Utilities.ByteArrayToString(_sha384); }
|
||||
@@ -85,7 +85,7 @@ namespace SabreTools.Library.DatItems
|
||||
/// <summary>
|
||||
/// Data SHA-512 hash
|
||||
/// </summary>
|
||||
[JsonProperty("sha512")]
|
||||
[JsonProperty("sha512", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string SHA512
|
||||
{
|
||||
get { return _sha512.IsNullOrEmpty() ? null : Utilities.ByteArrayToString(_sha512); }
|
||||
@@ -95,38 +95,38 @@ namespace SabreTools.Library.DatItems
|
||||
/// <summary>
|
||||
/// Disk name to merge from parent
|
||||
/// </summary>
|
||||
[JsonProperty("merge")]
|
||||
[JsonProperty("merge", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string MergeTag { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Disk region
|
||||
/// </summary>
|
||||
[JsonProperty("region")]
|
||||
[JsonProperty("region", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string Region { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Disk index
|
||||
/// </summary>
|
||||
[JsonProperty("index")]
|
||||
[JsonProperty("index", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string Index { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Disk writable flag
|
||||
/// </summary>
|
||||
[JsonProperty("writable")]
|
||||
[JsonProperty("writable", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public bool? Writable { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Disk dump status
|
||||
/// </summary>
|
||||
[JsonProperty("status")]
|
||||
[JsonProperty("status", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public ItemStatus ItemStatus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Determine if the disk is optional in the set
|
||||
/// </summary>
|
||||
[JsonProperty("optional")]
|
||||
[JsonProperty("optional", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public bool? Optional { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -21,68 +21,68 @@ namespace SabreTools.Library.DatItems
|
||||
/// <summary>
|
||||
/// Name of the machine
|
||||
/// </summary>
|
||||
[JsonProperty("name")]
|
||||
[JsonProperty("name", DefaultValueHandling = DefaultValueHandling.Include)]
|
||||
public string Name { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// Additional notes
|
||||
/// </summary>
|
||||
/// <remarks>Known as "Extra" in AttractMode</remarks>
|
||||
[JsonProperty("comment")]
|
||||
[JsonProperty("comment", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string Comment { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// Extended description
|
||||
/// </summary>
|
||||
[JsonProperty("description")]
|
||||
[JsonProperty("description", DefaultValueHandling = DefaultValueHandling.Include)]
|
||||
public string Description { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// Year(s) of release/manufacture
|
||||
/// </summary>
|
||||
[JsonProperty("year")]
|
||||
[JsonProperty("year", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string Year { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// Manufacturer, if available
|
||||
/// </summary>
|
||||
[JsonProperty("manufacturer")]
|
||||
[JsonProperty("manufacturer", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string Manufacturer { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// Publisher, if available
|
||||
/// </summary>
|
||||
[JsonProperty("publisher")]
|
||||
[JsonProperty("publisher", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string Publisher { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// Category, if available
|
||||
/// </summary>
|
||||
[JsonProperty("category")]
|
||||
[JsonProperty("category", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string Category { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// fomof parent
|
||||
/// </summary>
|
||||
[JsonProperty("romof")]
|
||||
[JsonProperty("romof", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string RomOf { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// cloneof parent
|
||||
/// </summary>
|
||||
[JsonProperty("cloneof")]
|
||||
[JsonProperty("cloneof", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string CloneOf { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// sampleof parent
|
||||
/// </summary>
|
||||
[JsonProperty("sampleof")]
|
||||
[JsonProperty("sampleof", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string SampleOf { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// Type of the machine
|
||||
/// </summary>
|
||||
[JsonProperty("type")]
|
||||
[JsonProperty("type", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public MachineType MachineType { get; set; } = MachineType.NULL;
|
||||
|
||||
#endregion
|
||||
@@ -93,43 +93,43 @@ namespace SabreTools.Library.DatItems
|
||||
/// Player count
|
||||
/// </summary>
|
||||
/// <remarks>Also in Logiqx EmuArc</remarks>
|
||||
[JsonProperty("players")]
|
||||
[JsonProperty("players", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string Players { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// Screen rotation
|
||||
/// </summary>
|
||||
[JsonProperty("rotation")]
|
||||
[JsonProperty("rotation", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string Rotation { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// Control method
|
||||
/// </summary>
|
||||
[JsonProperty("control")]
|
||||
[JsonProperty("control", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string Control { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// Support status
|
||||
/// </summary>
|
||||
[JsonProperty("status")]
|
||||
[JsonProperty("status", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string Status { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// Display count
|
||||
/// </summary>
|
||||
[JsonProperty("displaycount")]
|
||||
[JsonProperty("displaycount", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string DisplayCount { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// Display type
|
||||
/// </summary>
|
||||
[JsonProperty("displaytype")]
|
||||
[JsonProperty("displaytype", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string DisplayType { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// Number of input buttons
|
||||
/// </summary>
|
||||
[JsonProperty("buttons")]
|
||||
[JsonProperty("buttons", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string Buttons { get; set; } = null;
|
||||
|
||||
#endregion
|
||||
@@ -140,50 +140,50 @@ namespace SabreTools.Library.DatItems
|
||||
/// Emulator source file related to the machine
|
||||
/// </summary>
|
||||
/// <remarks>Also in Logiqx</remarks>
|
||||
[JsonProperty("sourcefile")]
|
||||
[JsonProperty("sourcefile", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string SourceFile { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// Machine runnable status
|
||||
/// </summary>
|
||||
/// <remarks>Also in Logiqx</remarks>
|
||||
[JsonProperty("runnable")]
|
||||
[JsonProperty("runnable", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public Runnable Runnable { get; set; } = Runnable.NULL;
|
||||
|
||||
/// <summary>
|
||||
/// List of associated device names
|
||||
/// </summary>
|
||||
[JsonProperty("devices")]
|
||||
[JsonProperty("devices", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public List<ListXmlDeviceReference> DeviceReferences { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// List of associated chips
|
||||
/// </summary>
|
||||
[JsonProperty("chips")]
|
||||
[JsonProperty("chips", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public List<ListXmlChip> Chips { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// List of associated displays
|
||||
/// </summary>
|
||||
[JsonProperty("displays")]
|
||||
[JsonProperty("displays", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public List<ListXmlDisplay> Displays { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// List of associated sounds
|
||||
/// </summary>
|
||||
[JsonProperty("sounds")]
|
||||
[JsonProperty("sounds", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public List<ListXmlSound> Sounds { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// List of associated conditions
|
||||
/// </summary>
|
||||
[JsonProperty("conditions")]
|
||||
[JsonProperty("conditions", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public List<ListXmlCondition> Conditions { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// List of associated inputs
|
||||
/// </summary>
|
||||
[JsonProperty("inputs")]
|
||||
[JsonProperty("inputs", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public List<ListXmlInput> Inputs { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
@@ -191,26 +191,26 @@ namespace SabreTools.Library.DatItems
|
||||
/// </summary>
|
||||
/// <remarks>Also in SoftwareList</remarks>
|
||||
/// TODO: Order ListXML and SoftwareList outputs by area names
|
||||
[JsonProperty("dipswitches")]
|
||||
[JsonProperty("dipswitches", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public List<ListXmlDipSwitch> DipSwitches { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// List of associated configurations
|
||||
/// </summary>
|
||||
[JsonProperty("configurations")]
|
||||
[JsonProperty("configurations", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public List<ListXmlConfiguration> Configurations { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// List of slot options
|
||||
/// </summary>
|
||||
[JsonProperty("slots")]
|
||||
[JsonProperty("slots", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public List<ListXmlSlot> Slots { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// List of info items
|
||||
/// </summary>
|
||||
/// <remarks>Also in SoftwareList</remarks>
|
||||
[JsonProperty("infos")]
|
||||
[JsonProperty("infos", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public List<ListXmlInfo> Infos { get; set; } = null;
|
||||
|
||||
#endregion
|
||||
@@ -220,13 +220,13 @@ namespace SabreTools.Library.DatItems
|
||||
/// <summary>
|
||||
/// Machine board name
|
||||
/// </summary>
|
||||
[JsonProperty("board")]
|
||||
[JsonProperty("board", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string Board { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// Rebuild location if different than machine name
|
||||
/// </summary>
|
||||
[JsonProperty("rebuildto")]
|
||||
[JsonProperty("rebuildto", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string RebuildTo { get; set; } = null;
|
||||
|
||||
#endregion
|
||||
@@ -236,55 +236,55 @@ namespace SabreTools.Library.DatItems
|
||||
/// <summary>
|
||||
/// Title ID
|
||||
/// </summary>
|
||||
[JsonProperty("titleid")]
|
||||
[JsonProperty("titleid", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string TitleID { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// Machine developer
|
||||
/// </summary>
|
||||
[JsonProperty("developer")]
|
||||
[JsonProperty("developer", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string Developer { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// Game genre
|
||||
/// </summary>
|
||||
[JsonProperty("genre")]
|
||||
[JsonProperty("genre", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string Genre { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// Game subgenre
|
||||
/// </summary>
|
||||
[JsonProperty("genre")]
|
||||
[JsonProperty("subgenre", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string Subgenre { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// Game ratings
|
||||
/// </summary>
|
||||
[JsonProperty("ratings")]
|
||||
[JsonProperty("ratings", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string Ratings { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// Game score
|
||||
/// </summary>
|
||||
[JsonProperty("score")]
|
||||
[JsonProperty("score", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string Score { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// Is the machine enabled
|
||||
/// </summary>
|
||||
[JsonProperty("enabled")]
|
||||
[JsonProperty("enabled", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string Enabled { get; set; } = null; // bool?
|
||||
|
||||
/// <summary>
|
||||
/// Does the game have a CRC check
|
||||
/// </summary>
|
||||
[JsonProperty("hascrc")]
|
||||
[JsonProperty("hascrc", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public bool? HasCrc { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// Machine relations
|
||||
/// </summary>
|
||||
[JsonProperty("relatedto")]
|
||||
[JsonProperty("relatedto", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string RelatedTo { get; set; } = null;
|
||||
|
||||
#endregion
|
||||
@@ -294,19 +294,19 @@ namespace SabreTools.Library.DatItems
|
||||
/// <summary>
|
||||
/// Generation MSX ID
|
||||
/// </summary>
|
||||
[JsonProperty("genmsxid")]
|
||||
[JsonProperty("genmsxid", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string GenMSXID { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// MSX System
|
||||
/// </summary>
|
||||
[JsonProperty("system")]
|
||||
[JsonProperty("system", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string System { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// Machine country of origin
|
||||
/// </summary>
|
||||
[JsonProperty("country")]
|
||||
[JsonProperty("country", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string Country { get; set; } = null;
|
||||
|
||||
#endregion
|
||||
@@ -316,13 +316,13 @@ namespace SabreTools.Library.DatItems
|
||||
/// <summary>
|
||||
/// Support status
|
||||
/// </summary>
|
||||
[JsonProperty("supported")]
|
||||
[JsonProperty("supported", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public Supported Supported { get; set; } = Supported.NULL;
|
||||
|
||||
/// <summary>
|
||||
/// List of shared feature items
|
||||
/// </summary>
|
||||
[JsonProperty("sharedfeat")]
|
||||
[JsonProperty("sharedfeat", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public List<SoftwareListSharedFeature> SharedFeatures { get; set; } = null;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -18,25 +18,25 @@ namespace SabreTools.Library.DatItems
|
||||
/// <summary>
|
||||
/// Release region(s)
|
||||
/// </summary>
|
||||
[JsonProperty("region")]
|
||||
[JsonProperty("region", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string Region { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Release language(s)
|
||||
/// </summary>
|
||||
[JsonProperty("language")]
|
||||
[JsonProperty("language", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string Language { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Date of release
|
||||
/// </summary>
|
||||
[JsonProperty("date")]
|
||||
[JsonProperty("date", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string Date { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Default release, if applicable
|
||||
/// </summary>
|
||||
[JsonProperty("default")]
|
||||
[JsonProperty("default", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public bool? Default { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -36,19 +36,19 @@ namespace SabreTools.Library.DatItems
|
||||
/// <summary>
|
||||
/// What BIOS is required for this rom
|
||||
/// </summary>
|
||||
[JsonProperty("bios")]
|
||||
[JsonProperty("bios", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string Bios { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Byte size of the rom
|
||||
/// </summary>
|
||||
[JsonProperty("size")]
|
||||
[JsonProperty("size", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public long Size { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// File CRC32 hash
|
||||
/// </summary>
|
||||
[JsonProperty("crc")]
|
||||
[JsonProperty("crc", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string CRC
|
||||
{
|
||||
get { return _crc.IsNullOrEmpty() ? null : Utilities.ByteArrayToString(_crc); }
|
||||
@@ -58,7 +58,7 @@ namespace SabreTools.Library.DatItems
|
||||
/// <summary>
|
||||
/// File MD5 hash
|
||||
/// </summary>
|
||||
[JsonProperty("md5")]
|
||||
[JsonProperty("md5", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string MD5
|
||||
{
|
||||
get { return _md5.IsNullOrEmpty() ? null : Utilities.ByteArrayToString(_md5); }
|
||||
@@ -69,7 +69,7 @@ namespace SabreTools.Library.DatItems
|
||||
/// <summary>
|
||||
/// File RIPEMD160 hash
|
||||
/// </summary>
|
||||
[JsonProperty("ripemd160")]
|
||||
[JsonProperty("ripemd160", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string RIPEMD160
|
||||
{
|
||||
get { return _ripemd160.IsNullOrEmpty() ? null : Utilities.ByteArrayToString(_ripemd160); }
|
||||
@@ -80,7 +80,7 @@ namespace SabreTools.Library.DatItems
|
||||
/// <summary>
|
||||
/// File SHA-1 hash
|
||||
/// </summary>
|
||||
[JsonProperty("sha1")]
|
||||
[JsonProperty("sha1", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string SHA1
|
||||
{
|
||||
get { return _sha1.IsNullOrEmpty() ? null : Utilities.ByteArrayToString(_sha1); }
|
||||
@@ -90,7 +90,7 @@ namespace SabreTools.Library.DatItems
|
||||
/// <summary>
|
||||
/// File SHA-256 hash
|
||||
/// </summary>
|
||||
[JsonProperty("sha256")]
|
||||
[JsonProperty("sha256", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string SHA256
|
||||
{
|
||||
get { return _sha256.IsNullOrEmpty() ? null : Utilities.ByteArrayToString(_sha256); }
|
||||
@@ -100,7 +100,7 @@ namespace SabreTools.Library.DatItems
|
||||
/// <summary>
|
||||
/// File SHA-384 hash
|
||||
/// </summary>
|
||||
[JsonProperty("sha384")]
|
||||
[JsonProperty("sha384", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string SHA384
|
||||
{
|
||||
get { return _sha384.IsNullOrEmpty() ? null : Utilities.ByteArrayToString(_sha384); }
|
||||
@@ -110,7 +110,7 @@ namespace SabreTools.Library.DatItems
|
||||
/// <summary>
|
||||
/// File SHA-512 hash
|
||||
/// </summary>
|
||||
[JsonProperty("sha512")]
|
||||
[JsonProperty("sha512", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string SHA512
|
||||
{
|
||||
get { return _sha512.IsNullOrEmpty() ? null : Utilities.ByteArrayToString(_sha512); }
|
||||
@@ -120,44 +120,44 @@ namespace SabreTools.Library.DatItems
|
||||
/// <summary>
|
||||
/// Rom name to merge from parent
|
||||
/// </summary>
|
||||
[JsonProperty("merge")]
|
||||
[JsonProperty("merge", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string MergeTag { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Rom region
|
||||
/// </summary>
|
||||
[JsonProperty("region")]
|
||||
[JsonProperty("region", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string Region { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Data offset within rom
|
||||
/// </summary>
|
||||
[JsonProperty("offset")]
|
||||
[JsonProperty("offset", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string Offset { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// File created date
|
||||
/// </summary>
|
||||
[JsonProperty("date")]
|
||||
[JsonProperty("date", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string Date { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Rom dump status
|
||||
/// </summary>
|
||||
[JsonProperty("status")]
|
||||
[JsonProperty("status", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public ItemStatus ItemStatus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Determine if the rom is optional in the set
|
||||
/// </summary>
|
||||
[JsonProperty("optional")]
|
||||
[JsonProperty("optional", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public bool? Optional { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Determine if the CRC32 hash is inverted
|
||||
/// </summary>
|
||||
[JsonProperty("inverted")]
|
||||
[JsonProperty("inverted", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public bool? Inverted { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user