Combine some tags

This commit is contained in:
Matt Nadareski
2020-09-08 10:12:41 -07:00
parent e34f50c464
commit f0afe33dd7
43 changed files with 106 additions and 160 deletions

View File

@@ -24,8 +24,7 @@ namespace SabreTools.Library.DatFiles
/// <summary> /// <summary>
/// Represents a format-agnostic DAT /// Represents a format-agnostic DAT
/// </summary> /// </summary>
[JsonObject("datfile")] [JsonObject("datfile"), XmlRoot("datfile")]
[XmlRoot("datfile")]
public abstract class DatFile public abstract class DatFile
{ {
#region Fields #region Fields

View File

@@ -14,8 +14,7 @@ namespace SabreTools.Library.DatFiles
/// <summary> /// <summary>
/// Represents all possible DAT header information /// Represents all possible DAT header information
/// </summary> /// </summary>
[JsonObject("header")] [JsonObject("header"), XmlRoot("header")]
[XmlRoot("header")]
public class DatHeader : ICloneable public class DatHeader : ICloneable
{ {
#region Fields #region Fields
@@ -153,8 +152,7 @@ namespace SabreTools.Library.DatFiles
/// <summary> /// <summary>
/// Read or write format /// Read or write format
/// </summary> /// </summary>
[JsonIgnore] [JsonIgnore, XmlIgnore]
[XmlIgnore]
public DatFormat DatFormat { get; set; } public DatFormat DatFormat { get; set; }
#endregion #endregion
@@ -267,8 +265,7 @@ namespace SabreTools.Library.DatFiles
/// <summary> /// <summary>
/// Output the item name /// Output the item name
/// </summary> /// </summary>
[JsonIgnore] [JsonIgnore, XmlIgnore]
[XmlIgnore]
public bool UseRomName { get; set; } public bool UseRomName { get; set; }
#endregion #endregion
@@ -342,50 +339,43 @@ namespace SabreTools.Library.DatFiles
/// <summary> /// <summary>
/// Text to prepend to all outputted lines /// Text to prepend to all outputted lines
/// </summary> /// </summary>
[JsonIgnore] [JsonIgnore, XmlIgnore]
[XmlIgnore]
public string Prefix { get; set; } public string Prefix { get; set; }
/// <summary> /// <summary>
/// Text to append to all outputted lines /// Text to append to all outputted lines
/// </summary> /// </summary>
[JsonIgnore] [JsonIgnore, XmlIgnore]
[XmlIgnore]
public string Postfix { get; set; } public string Postfix { get; set; }
/// <summary> /// <summary>
/// Add a new extension to all items /// Add a new extension to all items
/// </summary> /// </summary>
[JsonIgnore] [JsonIgnore, XmlIgnore]
[XmlIgnore]
public string AddExtension { get; set; } public string AddExtension { get; set; }
/// <summary> /// <summary>
/// Replace all item extensions /// Replace all item extensions
/// </summary> /// </summary>
[JsonIgnore] [JsonIgnore, XmlIgnore]
[XmlIgnore]
public string ReplaceExtension { get; set; } public string ReplaceExtension { get; set; }
/// <summary> /// <summary>
/// Remove all item extensions /// Remove all item extensions
/// </summary> /// </summary>
[JsonIgnore] [JsonIgnore, XmlIgnore]
[XmlIgnore]
public bool RemoveExtension { get; set; } public bool RemoveExtension { get; set; }
/// <summary> /// <summary>
/// Output the machine name /// Output the machine name
/// </summary> /// </summary>
[JsonIgnore] [JsonIgnore, XmlIgnore]
[XmlIgnore]
public bool GameName { get; set; } public bool GameName { get; set; }
/// <summary> /// <summary>
/// Wrap quotes around the entire line, sans prefix and postfix /// Wrap quotes around the entire line, sans prefix and postfix
/// </summary> /// </summary>
[JsonIgnore] [JsonIgnore, XmlIgnore]
[XmlIgnore]
public bool Quotes { get; set; } public bool Quotes { get; set; }
#endregion #endregion
@@ -395,15 +385,13 @@ namespace SabreTools.Library.DatFiles
/// <summary> /// <summary>
/// Input depot information /// Input depot information
/// </summary> /// </summary>
[JsonIgnore] [JsonIgnore, XmlIgnore]
[XmlIgnore]
public DepotInformation InputDepot { get; set; } public DepotInformation InputDepot { get; set; }
/// <summary> /// <summary>
/// Output depot information /// Output depot information
/// </summary> /// </summary>
[JsonIgnore] [JsonIgnore, XmlIgnore]
[XmlIgnore]
public DepotInformation OutputDepot { get; set; } public DepotInformation OutputDepot { get; set; }
#endregion #endregion

View File

@@ -5,6 +5,7 @@ using System.IO;
using System.Linq; using System.Linq;
using System.Net; using System.Net;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Xml.Serialization;
using SabreTools.Library.Data; using SabreTools.Library.Data;
using SabreTools.Library.DatItems; using SabreTools.Library.DatItems;
@@ -18,7 +19,7 @@ namespace SabreTools.Library.DatFiles
/// <summary> /// <summary>
/// Item dictionary with statistics, bucketing, and sorting /// Item dictionary with statistics, bucketing, and sorting
/// </summary> /// </summary>
[JsonObject("items")] [JsonObject("items"), XmlRoot("items")]
public class ItemDictionary : IDictionary<string, List<DatItem>> public class ItemDictionary : IDictionary<string, List<DatItem>>
{ {
#region Private instance variables #region Private instance variables
@@ -48,6 +49,7 @@ namespace SabreTools.Library.DatFiles
/// Get the keys from the file dictionary /// Get the keys from the file dictionary
/// </summary> /// </summary>
/// <returns>List of the keys</returns> /// <returns>List of the keys</returns>
[JsonIgnore, XmlIgnore]
public ICollection<string> Keys public ICollection<string> Keys
{ {
get { return items.Keys; } get { return items.Keys; }
@@ -57,6 +59,7 @@ namespace SabreTools.Library.DatFiles
/// Get the keys in sorted order from the file dictionary /// Get the keys in sorted order from the file dictionary
/// </summary> /// </summary>
/// <returns>List of the keys in sorted order</returns> /// <returns>List of the keys in sorted order</returns>
[JsonIgnore, XmlIgnore]
public List<string> SortedKeys public List<string> SortedKeys
{ {
get get
@@ -74,73 +77,73 @@ namespace SabreTools.Library.DatFiles
/// <summary> /// <summary>
/// Overall item count /// Overall item count
/// </summary> /// </summary>
[JsonIgnore] [JsonIgnore, XmlIgnore]
public long TotalCount { get; private set; } = 0; public long TotalCount { get; private set; } = 0;
/// <summary> /// <summary>
/// Number of Adjuster items /// Number of Adjuster items
/// </summary> /// </summary>
[JsonIgnore] [JsonIgnore, XmlIgnore]
public long AdjusterCount { get; private set; } = 0; public long AdjusterCount { get; private set; } = 0;
/// <summary> /// <summary>
/// Number of Analog items /// Number of Analog items
/// </summary> /// </summary>
[JsonIgnore] [JsonIgnore, XmlIgnore]
public long AnalogCount { get; private set; } = 0; public long AnalogCount { get; private set; } = 0;
/// <summary> /// <summary>
/// Number of Archive items /// Number of Archive items
/// </summary> /// </summary>
[JsonIgnore] [JsonIgnore, XmlIgnore]
public long ArchiveCount { get; private set; } = 0; public long ArchiveCount { get; private set; } = 0;
/// <summary> /// <summary>
/// Number of BiosSet items /// Number of BiosSet items
/// </summary> /// </summary>
[JsonIgnore] [JsonIgnore, XmlIgnore]
public long BiosSetCount { get; private set; } = 0; public long BiosSetCount { get; private set; } = 0;
/// <summary> /// <summary>
/// Number of Chip items /// Number of Chip items
/// </summary> /// </summary>
[JsonIgnore] [JsonIgnore, XmlIgnore]
public long ChipCount { get; private set; } = 0; public long ChipCount { get; private set; } = 0;
/// <summary> /// <summary>
/// Number of top-level Condition items /// Number of top-level Condition items
/// </summary> /// </summary>
[JsonIgnore] [JsonIgnore, XmlIgnore]
public long ConditionCount { get; private set; } = 0; public long ConditionCount { get; private set; } = 0;
/// <summary> /// <summary>
/// Number of Configuration items /// Number of Configuration items
/// </summary> /// </summary>
[JsonIgnore] [JsonIgnore, XmlIgnore]
public long ConfigurationCount { get; private set; } = 0; public long ConfigurationCount { get; private set; } = 0;
/// <summary> /// <summary>
/// Number of DataArea items /// Number of DataArea items
/// </summary> /// </summary>
[JsonIgnore] [JsonIgnore, XmlIgnore]
public long DataAreaCount { get; private set; } = 0; public long DataAreaCount { get; private set; } = 0;
/// <summary> /// <summary>
/// Number of Device items /// Number of Device items
/// </summary> /// </summary>
[JsonIgnore] [JsonIgnore, XmlIgnore]
public long DeviceCount { get; private set; } = 0; public long DeviceCount { get; private set; } = 0;
/// <summary> /// <summary>
/// Number of Device Reference items /// Number of Device Reference items
/// </summary> /// </summary>
[JsonIgnore] [JsonIgnore, XmlIgnore]
public long DeviceReferenceCount { get; private set; } = 0; public long DeviceReferenceCount { get; private set; } = 0;
/// <summary> /// <summary>
/// Number of DIP Switch items /// Number of DIP Switch items
/// </summary> /// </summary>
[JsonIgnore] [JsonIgnore, XmlIgnore]
public long DipSwitchCount { get; private set; } = 0; public long DipSwitchCount { get; private set; } = 0;
/// <summary> /// <summary>
@@ -152,202 +155,202 @@ namespace SabreTools.Library.DatFiles
/// <summary> /// <summary>
/// Number of DiskArea items /// Number of DiskArea items
/// </summary> /// </summary>
[JsonIgnore] [JsonIgnore, XmlIgnore]
public long DiskAreaCount { get; private set; } = 0; public long DiskAreaCount { get; private set; } = 0;
/// <summary> /// <summary>
/// Number of Display items /// Number of Display items
/// </summary> /// </summary>
[JsonIgnore] [JsonIgnore, XmlIgnore]
public long DisplayCount { get; private set; } = 0; public long DisplayCount { get; private set; } = 0;
/// <summary> /// <summary>
/// Number of Driver items /// Number of Driver items
/// </summary> /// </summary>
[JsonIgnore] [JsonIgnore, XmlIgnore]
public long DriverCount { get; private set; } = 0; public long DriverCount { get; private set; } = 0;
/// <summary> /// <summary>
/// Number of Feature items /// Number of Feature items
/// </summary> /// </summary>
[JsonIgnore] [JsonIgnore, XmlIgnore]
public long FeatureCount { get; private set; } = 0; public long FeatureCount { get; private set; } = 0;
/// <summary> /// <summary>
/// Number of Info items /// Number of Info items
/// </summary> /// </summary>
[JsonIgnore] [JsonIgnore, XmlIgnore]
public long InfoCount { get; private set; } = 0; public long InfoCount { get; private set; } = 0;
/// <summary> /// <summary>
/// Number of Input items /// Number of Input items
/// </summary> /// </summary>
[JsonIgnore] [JsonIgnore, XmlIgnore]
public long InputCount { get; private set; } = 0; public long InputCount { get; private set; } = 0;
/// <summary> /// <summary>
/// Number of Media items /// Number of Media items
/// </summary> /// </summary>
[JsonIgnore] [JsonIgnore, XmlIgnore]
public long MediaCount { get; private set; } = 0; public long MediaCount { get; private set; } = 0;
/// <summary> /// <summary>
/// Number of Part items /// Number of Part items
/// </summary> /// </summary>
[JsonIgnore] [JsonIgnore, XmlIgnore]
public long PartCount { get; private set; } = 0; public long PartCount { get; private set; } = 0;
/// <summary> /// <summary>
/// Number of PartFeature items /// Number of PartFeature items
/// </summary> /// </summary>
[JsonIgnore] [JsonIgnore, XmlIgnore]
public long PartFeatureCount { get; private set; } = 0; public long PartFeatureCount { get; private set; } = 0;
/// <summary> /// <summary>
/// Number of Port items /// Number of Port items
/// </summary> /// </summary>
[JsonIgnore] [JsonIgnore, XmlIgnore]
public long PortCount { get; private set; } = 0; public long PortCount { get; private set; } = 0;
/// <summary> /// <summary>
/// Number of RamOption items /// Number of RamOption items
/// </summary> /// </summary>
[JsonIgnore] [JsonIgnore, XmlIgnore]
public long RamOptionCount { get; private set; } = 0; public long RamOptionCount { get; private set; } = 0;
/// <summary> /// <summary>
/// Number of Release items /// Number of Release items
/// </summary> /// </summary>
[JsonIgnore] [JsonIgnore, XmlIgnore]
public long ReleaseCount { get; private set; } = 0; public long ReleaseCount { get; private set; } = 0;
/// <summary> /// <summary>
/// Number of Rom items /// Number of Rom items
/// </summary> /// </summary>
[JsonIgnore] [JsonIgnore, XmlIgnore]
public long RomCount { get; private set; } = 0; public long RomCount { get; private set; } = 0;
/// <summary> /// <summary>
/// Number of Sample items /// Number of Sample items
/// </summary> /// </summary>
[JsonIgnore] [JsonIgnore, XmlIgnore]
public long SampleCount { get; private set; } = 0; public long SampleCount { get; private set; } = 0;
/// <summary> /// <summary>
/// Number of SharedFeature items /// Number of SharedFeature items
/// </summary> /// </summary>
[JsonIgnore] [JsonIgnore, XmlIgnore]
public long SharedFeatureCount { get; private set; } = 0; public long SharedFeatureCount { get; private set; } = 0;
/// <summary> /// <summary>
/// Number of Slot items /// Number of Slot items
/// </summary> /// </summary>
[JsonIgnore] [JsonIgnore, XmlIgnore]
public long SlotCount { get; private set; } = 0; public long SlotCount { get; private set; } = 0;
/// <summary> /// <summary>
/// Number of SoftwareList items /// Number of SoftwareList items
/// </summary> /// </summary>
[JsonIgnore] [JsonIgnore, XmlIgnore]
public long SoftwareListCount { get; private set; } = 0; public long SoftwareListCount { get; private set; } = 0;
/// <summary> /// <summary>
/// Number of Sound items /// Number of Sound items
/// </summary> /// </summary>
[JsonIgnore] [JsonIgnore, XmlIgnore]
public long SoundCount { get; private set; } = 0; public long SoundCount { get; private set; } = 0;
/// <summary> /// <summary>
/// Number of machines /// Number of machines
/// </summary> /// </summary>
/// <remarks>Special count only used by statistics output</remarks> /// <remarks>Special count only used by statistics output</remarks>
[JsonIgnore] [JsonIgnore, XmlIgnore]
public long GameCount { get; private set; } = 0; public long GameCount { get; private set; } = 0;
/// <summary> /// <summary>
/// Total uncompressed size /// Total uncompressed size
/// </summary> /// </summary>
[JsonIgnore] [JsonIgnore, XmlIgnore]
public long TotalSize { get; private set; } = 0; public long TotalSize { get; private set; } = 0;
/// <summary> /// <summary>
/// Number of items with a CRC hash /// Number of items with a CRC hash
/// </summary> /// </summary>
[JsonIgnore] [JsonIgnore, XmlIgnore]
public long CRCCount { get; private set; } = 0; public long CRCCount { get; private set; } = 0;
/// <summary> /// <summary>
/// Number of items with an MD5 hash /// Number of items with an MD5 hash
/// </summary> /// </summary>
[JsonIgnore] [JsonIgnore, XmlIgnore]
public long MD5Count { get; private set; } = 0; public long MD5Count { get; private set; } = 0;
#if NET_FRAMEWORK #if NET_FRAMEWORK
/// <summary> /// <summary>
/// Number of items with a RIPEMD160 hash /// Number of items with a RIPEMD160 hash
/// </summary> /// </summary>
[JsonIgnore] [JsonIgnore, XmlIgnore]
public long RIPEMD160Count { get; private set; } = 0; public long RIPEMD160Count { get; private set; } = 0;
#endif #endif
/// <summary> /// <summary>
/// Number of items with a SHA-1 hash /// Number of items with a SHA-1 hash
/// </summary> /// </summary>
[JsonIgnore] [JsonIgnore, XmlIgnore]
public long SHA1Count { get; private set; } = 0; public long SHA1Count { get; private set; } = 0;
/// <summary> /// <summary>
/// Number of items with a SHA-256 hash /// Number of items with a SHA-256 hash
/// </summary> /// </summary>
[JsonIgnore] [JsonIgnore, XmlIgnore]
public long SHA256Count { get; private set; } = 0; public long SHA256Count { get; private set; } = 0;
/// <summary> /// <summary>
/// Number of items with a SHA-384 hash /// Number of items with a SHA-384 hash
/// </summary> /// </summary>
[JsonIgnore] [JsonIgnore, XmlIgnore]
public long SHA384Count { get; private set; } = 0; public long SHA384Count { get; private set; } = 0;
/// <summary> /// <summary>
/// Number of items with a SHA-512 hash /// Number of items with a SHA-512 hash
/// </summary> /// </summary>
[JsonIgnore] [JsonIgnore, XmlIgnore]
public long SHA512Count { get; private set; } = 0; public long SHA512Count { get; private set; } = 0;
/// <summary> /// <summary>
/// Number of items with a SpamSum fuzzy hash /// Number of items with a SpamSum fuzzy hash
/// </summary> /// </summary>
[JsonIgnore] [JsonIgnore, XmlIgnore]
public long SpamSumCount { get; private set; } = 0; public long SpamSumCount { get; private set; } = 0;
/// <summary> /// <summary>
/// Number of items with the baddump status /// Number of items with the baddump status
/// </summary> /// </summary>
[JsonIgnore] [JsonIgnore, XmlIgnore]
public long BaddumpCount { get; private set; } = 0; public long BaddumpCount { get; private set; } = 0;
/// <summary> /// <summary>
/// Number of items with the good status /// Number of items with the good status
/// </summary> /// </summary>
[JsonIgnore] [JsonIgnore, XmlIgnore]
public long GoodCount { get; private set; } = 0; public long GoodCount { get; private set; } = 0;
/// <summary> /// <summary>
/// Number of items with the nodump status /// Number of items with the nodump status
/// </summary> /// </summary>
[JsonIgnore] [JsonIgnore, XmlIgnore]
public long NodumpCount { get; private set; } = 0; public long NodumpCount { get; private set; } = 0;
/// <summary> /// <summary>
/// Number of items with the remove flag /// Number of items with the remove flag
/// </summary> /// </summary>
[JsonIgnore] [JsonIgnore, XmlIgnore]
public long RemovedCount { get; private set; } = 0; public long RemovedCount { get; private set; } = 0;
/// <summary> /// <summary>
/// Number of items with the verified status /// Number of items with the verified status
/// </summary> /// </summary>
[JsonIgnore] [JsonIgnore, XmlIgnore]
public long VerifiedCount { get; private set; } = 0; public long VerifiedCount { get; private set; } = 0;
#endregion #endregion

View File

@@ -12,8 +12,7 @@ namespace SabreTools.Library.DatItems
/// <summary> /// <summary>
/// Represents which Adjuster(s) is associated with a set /// Represents which Adjuster(s) is associated with a set
/// </summary> /// </summary>
[JsonObject("adjuster")] [JsonObject("adjuster"), XmlRoot("adjuster")]
[XmlRoot("adjuster")]
public class Adjuster : DatItem public class Adjuster : DatItem
{ {
#region Fields #region Fields

View File

@@ -10,8 +10,7 @@ namespace SabreTools.Library.DatItems
/// <summary> /// <summary>
/// Represents a single analog item /// Represents a single analog item
/// </summary> /// </summary>
[JsonObject("analog")] [JsonObject("analog"), XmlRoot("analog")]
[XmlRoot("analog")]
public class Analog : DatItem public class Analog : DatItem
{ {
#region Fields #region Fields

View File

@@ -12,8 +12,7 @@ namespace SabreTools.Library.DatItems
/// <summary> /// <summary>
/// Represents generic archive files to be included in a set /// Represents generic archive files to be included in a set
/// </summary> /// </summary>
[JsonObject("archive")] [JsonObject("archive"), XmlRoot("archive")]
[XmlRoot("archive")]
public class Archive : DatItem public class Archive : DatItem
{ {
#region Fields #region Fields

View File

@@ -14,8 +14,7 @@ namespace SabreTools.Library.DatItems
/// <summary> /// <summary>
/// Represents the OpenMSX original value /// Represents the OpenMSX original value
/// </summary> /// </summary>
[JsonObject("original")] [JsonObject("original"), XmlRoot("original")]
[XmlRoot("original")]
public class Original public class Original
{ {
[JsonProperty("value")] [JsonProperty("value")]

View File

@@ -12,8 +12,7 @@ namespace SabreTools.Library.DatItems
/// <summary> /// <summary>
/// Represents which BIOS(es) is associated with a set /// Represents which BIOS(es) is associated with a set
/// </summary> /// </summary>
[JsonObject("biosset")] [JsonObject("biosset"), XmlRoot("biosset")]
[XmlRoot("biosset")]
public class BiosSet : DatItem public class BiosSet : DatItem
{ {
#region Fields #region Fields

View File

@@ -7,8 +7,7 @@ namespace SabreTools.Library.DatItems
/// <summary> /// <summary>
/// Represents a blank set from an input DAT /// Represents a blank set from an input DAT
/// </summary> /// </summary>
[JsonObject("blank")] [JsonObject("blank"), XmlRoot("blank")]
[XmlRoot("blank")]
public class Blank : DatItem public class Blank : DatItem
{ {
#region Constructors #region Constructors

View File

@@ -14,8 +14,7 @@ namespace SabreTools.Library.DatItems
/// <summary> /// <summary>
/// Represents which Chip(s) is associated with a set /// Represents which Chip(s) is associated with a set
/// </summary> /// </summary>
[JsonObject("chip")] [JsonObject("chip"), XmlRoot("chip")]
[XmlRoot("chip")]
public class Chip : DatItem public class Chip : DatItem
{ {
#region Fields #region Fields

View File

@@ -12,8 +12,7 @@ namespace SabreTools.Library.DatItems
/// <summary> /// <summary>
/// Represents a condition on a machine or other item /// Represents a condition on a machine or other item
/// </summary> /// </summary>
[JsonObject("condition")] [JsonObject("condition"), XmlRoot("condition")]
[XmlRoot("condition")]
public class Condition : DatItem public class Condition : DatItem
{ {
#region Fields #region Fields

View File

@@ -12,8 +12,7 @@ namespace SabreTools.Library.DatItems
/// <summary> /// <summary>
/// Represents which Configuration(s) is associated with a set /// Represents which Configuration(s) is associated with a set
/// </summary> /// </summary>
[JsonObject("configuration")] [JsonObject("configuration"), XmlRoot("configuration")]
[XmlRoot("configuration")]
public class Configuration : DatItem public class Configuration : DatItem
{ {
#region Fields #region Fields

View File

@@ -13,8 +13,7 @@ namespace SabreTools.Library.DatItems
/// <summary> /// <summary>
/// Represents control for an input /// Represents control for an input
/// </summary> /// </summary>
[JsonObject("control")] [JsonObject("control"), XmlRoot("control")]
[XmlRoot("control")]
public class Control : DatItem public class Control : DatItem
{ {
#region Fields #region Fields

View File

@@ -17,8 +17,7 @@ namespace SabreTools.Library.DatItems
/// <summary> /// <summary>
/// Base class for all items included in a set /// Base class for all items included in a set
/// </summary> /// </summary>
[JsonObject("datitem")] [JsonObject("datitem"), XmlRoot("datitem")]
[XmlRoot("datitem")]
[XmlInclude(typeof(Adjuster))] [XmlInclude(typeof(Adjuster))]
[XmlInclude(typeof(Analog))] [XmlInclude(typeof(Analog))]
[XmlInclude(typeof(Archive))] [XmlInclude(typeof(Archive))]
@@ -73,8 +72,7 @@ namespace SabreTools.Library.DatItems
/// <summary> /// <summary>
/// Duplicate type when compared to another item /// Duplicate type when compared to another item
/// </summary> /// </summary>
[JsonIgnore] [JsonIgnore, XmlIgnore]
[XmlIgnore]
public DupeType DupeType { get; set; } public DupeType DupeType { get; set; }
#endregion #endregion
@@ -84,8 +82,7 @@ namespace SabreTools.Library.DatItems
/// <summary> /// <summary>
/// Machine values /// Machine values
/// </summary> /// </summary>
[JsonIgnore] [JsonIgnore, XmlIgnore]
[XmlIgnore]
public Machine Machine { get; set; } = new Machine(); public Machine Machine { get; set; } = new Machine();
#endregion #endregion
@@ -95,15 +92,13 @@ namespace SabreTools.Library.DatItems
/// <summary> /// <summary>
/// Source information /// Source information
/// </summary> /// </summary>
[JsonIgnore] [JsonIgnore, XmlIgnore]
[XmlIgnore]
public Source Source { get; set; } = new Source(); public Source Source { get; set; } = new Source();
/// <summary> /// <summary>
/// Flag if item should be removed /// Flag if item should be removed
/// </summary> /// </summary>
[JsonIgnore] [JsonIgnore, XmlIgnore]
[XmlIgnore]
public bool Remove { get; set; } public bool Remove { get; set; }
#endregion #endregion

View File

@@ -14,8 +14,7 @@ namespace SabreTools.Library.DatItems
/// SoftwareList dataarea information /// SoftwareList dataarea information
/// </summary> /// </summary>
/// <remarks>One DataArea can contain multiple Rom items</remarks> /// <remarks>One DataArea can contain multiple Rom items</remarks>
[JsonObject("dataarea")] [JsonObject("dataarea"), XmlRoot("dataarea")]
[XmlRoot("dataarea")]
public class DataArea : DatItem public class DataArea : DatItem
{ {
#region Fields #region Fields

View File

@@ -12,8 +12,7 @@ namespace SabreTools.Library.DatItems
/// <summary> /// <summary>
/// Represents a single device on the machine /// Represents a single device on the machine
/// </summary> /// </summary>
[JsonObject("device")] [JsonObject("device"), XmlRoot("device")]
[XmlRoot("device")]
public class Device : DatItem public class Device : DatItem
{ {
#region Fields #region Fields

View File

@@ -12,8 +12,7 @@ namespace SabreTools.Library.DatItems
/// <summary> /// <summary>
/// Represents which Device Reference(s) is associated with a set /// Represents which Device Reference(s) is associated with a set
/// </summary> /// </summary>
[JsonObject("device_ref")] [JsonObject("device_ref"), XmlRoot("device_ref")]
[XmlRoot("device_ref")]
public class DeviceReference : DatItem public class DeviceReference : DatItem
{ {
#region Fields #region Fields

View File

@@ -12,8 +12,7 @@ namespace SabreTools.Library.DatItems
/// <summary> /// <summary>
/// Represents which DIP Switch(es) is associated with a set /// Represents which DIP Switch(es) is associated with a set
/// </summary> /// </summary>
[JsonObject("dipswitch")] [JsonObject("dipswitch"), XmlRoot("dipswitch")]
[XmlRoot("dipswitch")]
public class DipSwitch : DatItem public class DipSwitch : DatItem
{ {
#region Fields #region Fields

View File

@@ -14,8 +14,7 @@ namespace SabreTools.Library.DatItems
/// <summary> /// <summary>
/// Represents Compressed Hunks of Data (CHD) formatted disks which use internal hashes /// Represents Compressed Hunks of Data (CHD) formatted disks which use internal hashes
/// </summary> /// </summary>
[JsonObject("disk")] [JsonObject("disk"), XmlRoot("disk")]
[XmlRoot("disk")]
public class Disk : DatItem public class Disk : DatItem
{ {
#region Private instance variables #region Private instance variables

View File

@@ -14,8 +14,7 @@ namespace SabreTools.Library.DatItems
/// SoftwareList diskarea information /// SoftwareList diskarea information
/// </summary> /// </summary>
/// <remarks>One DiskArea can contain multiple Disk items</remarks> /// <remarks>One DiskArea can contain multiple Disk items</remarks>
[JsonObject("diskarea")] [JsonObject("diskarea"), XmlRoot("diskarea")]
[XmlRoot("diskarea")]
public class DiskArea : DatItem public class DiskArea : DatItem
{ {
#region Fields #region Fields

View File

@@ -13,8 +13,7 @@ namespace SabreTools.Library.DatItems
/// <summary> /// <summary>
/// Represents one machine display /// Represents one machine display
/// </summary> /// </summary>
[JsonObject("display")] [JsonObject("display"), XmlRoot("display")]
[XmlRoot("display")]
public class Display : DatItem public class Display : DatItem
{ {
#region Fields #region Fields

View File

@@ -12,8 +12,7 @@ namespace SabreTools.Library.DatItems
/// <summary> /// <summary>
/// Represents the a driver of the machine /// Represents the a driver of the machine
/// </summary> /// </summary>
[JsonObject("driver")] [JsonObject("driver"), XmlRoot("driver")]
[XmlRoot("driver")]
public class Driver : DatItem public class Driver : DatItem
{ {
#region Fields #region Fields

View File

@@ -12,8 +12,7 @@ namespace SabreTools.Library.DatItems
/// <summary> /// <summary>
/// Represents a matchable extension /// Represents a matchable extension
/// </summary> /// </summary>
[JsonObject("extension")] [JsonObject("extension"), XmlRoot("extension")]
[XmlRoot("extension")]
public class Extension : DatItem public class Extension : DatItem
{ {
#region Fields #region Fields

View File

@@ -12,8 +12,7 @@ namespace SabreTools.Library.DatItems
/// <summary> /// <summary>
/// Represents the a feature of the machine /// Represents the a feature of the machine
/// </summary> /// </summary>
[JsonObject("feature")] [JsonObject("feature"), XmlRoot("feature")]
[XmlRoot("feature")]
public class Feature : DatItem public class Feature : DatItem
{ {
#region Fields #region Fields

View File

@@ -12,8 +12,7 @@ namespace SabreTools.Library.DatItems
/// <summary> /// <summary>
/// Represents special information about a machine /// Represents special information about a machine
/// </summary> /// </summary>
[JsonObject("info")] [JsonObject("info"), XmlRoot("info")]
[XmlRoot("info")]
public class Info : DatItem public class Info : DatItem
{ {
#region Fields #region Fields

View File

@@ -12,8 +12,7 @@ namespace SabreTools.Library.DatItems
/// <summary> /// <summary>
/// Represents one ListXML input /// Represents one ListXML input
/// </summary> /// </summary>
[JsonObject("input")] [JsonObject("input"), XmlRoot("input")]
[XmlRoot("input")]
public class Input : DatItem public class Input : DatItem
{ {
#region Fields #region Fields

View File

@@ -12,8 +12,7 @@ namespace SabreTools.Library.DatItems
/// <summary> /// <summary>
/// Represents a single instance of another item /// Represents a single instance of another item
/// </summary> /// </summary>
[JsonObject("instance")] [JsonObject("instance"), XmlRoot("instance")]
[XmlRoot("instance")]
public class Instance : DatItem public class Instance : DatItem
{ {
#region Fields #region Fields

View File

@@ -12,8 +12,7 @@ namespace SabreTools.Library.DatItems
/// <summary> /// <summary>
/// Represents one conflocation or diplocation /// Represents one conflocation or diplocation
/// </summary> /// </summary>
[JsonObject("location")] [JsonObject("location"), XmlRoot("location")]
[XmlRoot("location")]
public class Location : DatItem public class Location : DatItem
{ {
#region Fields #region Fields

View File

@@ -13,8 +13,7 @@ namespace SabreTools.Library.DatItems
/// <summary> /// <summary>
/// Represents the information specific to a set/game/machine /// Represents the information specific to a set/game/machine
/// </summary> /// </summary>
[JsonObject("machine")] [JsonObject("machine"), XmlRoot("machine")]
[XmlRoot("machine")]
public class Machine : ICloneable public class Machine : ICloneable
{ {
#region Fields #region Fields

View File

@@ -14,8 +14,7 @@ namespace SabreTools.Library.DatItems
/// <summary> /// <summary>
/// Represents Aaruformat images which use internal hashes /// Represents Aaruformat images which use internal hashes
/// </summary> /// </summary>
[JsonObject("media")] [JsonObject("media"), XmlRoot("media")]
[XmlRoot("media")]
public class Media : DatItem public class Media : DatItem
{ {
#region Private instance variables #region Private instance variables

View File

@@ -14,8 +14,7 @@ namespace SabreTools.Library.DatItems
/// SoftwareList part information /// SoftwareList part information
/// </summary> /// </summary>
/// <remarks>One Part can contain multiple PartFeature, DataArea, DiskArea, and DipSwitch items</remarks> /// <remarks>One Part can contain multiple PartFeature, DataArea, DiskArea, and DipSwitch items</remarks>
[JsonObject("part")] [JsonObject("part"), XmlRoot("part")]
[XmlRoot("part")]
public class Part : DatItem public class Part : DatItem
{ {
#region Fields #region Fields

View File

@@ -12,8 +12,7 @@ namespace SabreTools.Library.DatItems
/// <summary> /// <summary>
/// Represents one part feature object /// Represents one part feature object
/// </summary> /// </summary>
[JsonObject("part_feature")] [JsonObject("part_feature"), XmlRoot("part_feature")]
[XmlRoot("part_feature")]
public class PartFeature : DatItem public class PartFeature : DatItem
{ {
#region Fields #region Fields

View File

@@ -10,8 +10,7 @@ namespace SabreTools.Library.DatItems
/// <summary> /// <summary>
/// Represents a single port on a machine /// Represents a single port on a machine
/// </summary> /// </summary>
[JsonObject("port")] [JsonObject("port"), XmlRoot("port")]
[XmlRoot("port")]
public class Port : DatItem public class Port : DatItem
{ {
#region Fields #region Fields

View File

@@ -12,8 +12,7 @@ namespace SabreTools.Library.DatItems
/// <summary> /// <summary>
/// Represents which RAM option(s) is associated with a set /// Represents which RAM option(s) is associated with a set
/// </summary> /// </summary>
[JsonObject("ramoption")] [JsonObject("ramoption"), XmlRoot("ramoption")]
[XmlRoot("ramoption")]
public class RamOption : DatItem public class RamOption : DatItem
{ {
#region Fields #region Fields

View File

@@ -12,8 +12,7 @@ namespace SabreTools.Library.DatItems
/// <summary> /// <summary>
/// Represents release information about a set /// Represents release information about a set
/// </summary> /// </summary>
[JsonObject("release")] [JsonObject("release"), XmlRoot("release")]
[XmlRoot("release")]
public class Release : DatItem public class Release : DatItem
{ {
#region Fields #region Fields

View File

@@ -17,8 +17,7 @@ namespace SabreTools.Library.DatItems
/// <summary> /// <summary>
/// Represents a generic file within a set /// Represents a generic file within a set
/// </summary> /// </summary>
[JsonObject("rom")] [JsonObject("rom"), XmlRoot("rom")]
[XmlRoot("rom")]
public class Rom : DatItem public class Rom : DatItem
{ {
#region Private instance variables #region Private instance variables

View File

@@ -12,8 +12,7 @@ namespace SabreTools.Library.DatItems
/// <summary> /// <summary>
/// Represents a (usually WAV-formatted) sample to be included for use in the set /// Represents a (usually WAV-formatted) sample to be included for use in the set
/// </summary> /// </summary>
[JsonObject("sample")] [JsonObject("sample"), XmlRoot("sample")]
[XmlRoot("sample")]
public class Sample : DatItem public class Sample : DatItem
{ {
#region Fields #region Fields

View File

@@ -12,8 +12,7 @@ namespace SabreTools.Library.DatItems
/// <summary> /// <summary>
/// Represents one ListXML confsetting or dipvalue /// Represents one ListXML confsetting or dipvalue
/// </summary> /// </summary>
[JsonObject("setting")] [JsonObject("setting"), XmlRoot("setting")]
[XmlRoot("setting")]
public class Setting : DatItem public class Setting : DatItem
{ {
#region Fields #region Fields

View File

@@ -12,8 +12,7 @@ namespace SabreTools.Library.DatItems
/// <summary> /// <summary>
/// Represents one shared feature object /// Represents one shared feature object
/// </summary> /// </summary>
[JsonObject("sharedfeat")] [JsonObject("sharedfeat"), XmlRoot("sharedfeat")]
[XmlRoot("sharedfeat")]
public class SharedFeature : DatItem public class SharedFeature : DatItem
{ {
#region Fields #region Fields

View File

@@ -12,8 +12,7 @@ namespace SabreTools.Library.DatItems
/// <summary> /// <summary>
/// Represents which Slot(s) is associated with a set /// Represents which Slot(s) is associated with a set
/// </summary> /// </summary>
[JsonObject("slot")] [JsonObject("slot"), XmlRoot("slot")]
[XmlRoot("slot")]
public class Slot : DatItem public class Slot : DatItem
{ {
#region Fields #region Fields

View File

@@ -12,8 +12,7 @@ namespace SabreTools.Library.DatItems
/// <summary> /// <summary>
/// Represents one ListXML slotoption /// Represents one ListXML slotoption
/// </summary> /// </summary>
[JsonObject("slotoption")] [JsonObject("slotoption"), XmlRoot("slotoption")]
[XmlRoot("slotoption")]
public class SlotOption : DatItem public class SlotOption : DatItem
{ {
#region Fields #region Fields

View File

@@ -13,8 +13,7 @@ namespace SabreTools.Library.DatItems
/// <summary> /// <summary>
/// Represents which SoftwareList(s) is associated with a set /// Represents which SoftwareList(s) is associated with a set
/// </summary> /// </summary>
[JsonObject("softwarelist")] [JsonObject("softwarelist"), XmlRoot("softwarelist")]
[XmlRoot("softwarelist")]
public class SoftwareList : DatItem public class SoftwareList : DatItem
{ {
#region Fields #region Fields

View File

@@ -12,8 +12,7 @@ namespace SabreTools.Library.DatItems
/// <summary> /// <summary>
/// Represents the sound output for a machine /// Represents the sound output for a machine
/// </summary> /// </summary>
[JsonObject("sound")] [JsonObject("sound"), XmlRoot("sound")]
[XmlRoot("sound")]
public class Sound : DatItem public class Sound : DatItem
{ {
#region Fields #region Fields