diff --git a/SabreTools.Library/DatFiles/DatFile.cs b/SabreTools.Library/DatFiles/DatFile.cs index 739ee8ce..dfda6a53 100644 --- a/SabreTools.Library/DatFiles/DatFile.cs +++ b/SabreTools.Library/DatFiles/DatFile.cs @@ -24,8 +24,7 @@ namespace SabreTools.Library.DatFiles /// /// Represents a format-agnostic DAT /// - [JsonObject("datfile")] - [XmlRoot("datfile")] + [JsonObject("datfile"), XmlRoot("datfile")] public abstract class DatFile { #region Fields diff --git a/SabreTools.Library/DatFiles/DatHeader.cs b/SabreTools.Library/DatFiles/DatHeader.cs index e467ec6e..6ebee568 100644 --- a/SabreTools.Library/DatFiles/DatHeader.cs +++ b/SabreTools.Library/DatFiles/DatHeader.cs @@ -14,8 +14,7 @@ namespace SabreTools.Library.DatFiles /// /// Represents all possible DAT header information /// - [JsonObject("header")] - [XmlRoot("header")] + [JsonObject("header"), XmlRoot("header")] public class DatHeader : ICloneable { #region Fields @@ -153,8 +152,7 @@ namespace SabreTools.Library.DatFiles /// /// Read or write format /// - [JsonIgnore] - [XmlIgnore] + [JsonIgnore, XmlIgnore] public DatFormat DatFormat { get; set; } #endregion @@ -267,8 +265,7 @@ namespace SabreTools.Library.DatFiles /// /// Output the item name /// - [JsonIgnore] - [XmlIgnore] + [JsonIgnore, XmlIgnore] public bool UseRomName { get; set; } #endregion @@ -342,50 +339,43 @@ namespace SabreTools.Library.DatFiles /// /// Text to prepend to all outputted lines /// - [JsonIgnore] - [XmlIgnore] + [JsonIgnore, XmlIgnore] public string Prefix { get; set; } /// /// Text to append to all outputted lines /// - [JsonIgnore] - [XmlIgnore] + [JsonIgnore, XmlIgnore] public string Postfix { get; set; } /// /// Add a new extension to all items /// - [JsonIgnore] - [XmlIgnore] + [JsonIgnore, XmlIgnore] public string AddExtension { get; set; } /// /// Replace all item extensions /// - [JsonIgnore] - [XmlIgnore] + [JsonIgnore, XmlIgnore] public string ReplaceExtension { get; set; } /// /// Remove all item extensions /// - [JsonIgnore] - [XmlIgnore] + [JsonIgnore, XmlIgnore] public bool RemoveExtension { get; set; } /// /// Output the machine name /// - [JsonIgnore] - [XmlIgnore] + [JsonIgnore, XmlIgnore] public bool GameName { get; set; } /// /// Wrap quotes around the entire line, sans prefix and postfix /// - [JsonIgnore] - [XmlIgnore] + [JsonIgnore, XmlIgnore] public bool Quotes { get; set; } #endregion @@ -395,15 +385,13 @@ namespace SabreTools.Library.DatFiles /// /// Input depot information /// - [JsonIgnore] - [XmlIgnore] + [JsonIgnore, XmlIgnore] public DepotInformation InputDepot { get; set; } /// /// Output depot information /// - [JsonIgnore] - [XmlIgnore] + [JsonIgnore, XmlIgnore] public DepotInformation OutputDepot { get; set; } #endregion diff --git a/SabreTools.Library/DatFiles/ItemDictionary.cs b/SabreTools.Library/DatFiles/ItemDictionary.cs index 0786bdf4..4cc76e31 100644 --- a/SabreTools.Library/DatFiles/ItemDictionary.cs +++ b/SabreTools.Library/DatFiles/ItemDictionary.cs @@ -5,6 +5,7 @@ using System.IO; using System.Linq; using System.Net; using System.Threading.Tasks; +using System.Xml.Serialization; using SabreTools.Library.Data; using SabreTools.Library.DatItems; @@ -18,7 +19,7 @@ namespace SabreTools.Library.DatFiles /// /// Item dictionary with statistics, bucketing, and sorting /// - [JsonObject("items")] + [JsonObject("items"), XmlRoot("items")] public class ItemDictionary : IDictionary> { #region Private instance variables @@ -48,6 +49,7 @@ namespace SabreTools.Library.DatFiles /// Get the keys from the file dictionary /// /// List of the keys + [JsonIgnore, XmlIgnore] public ICollection Keys { get { return items.Keys; } @@ -57,6 +59,7 @@ namespace SabreTools.Library.DatFiles /// Get the keys in sorted order from the file dictionary /// /// List of the keys in sorted order + [JsonIgnore, XmlIgnore] public List SortedKeys { get @@ -74,73 +77,73 @@ namespace SabreTools.Library.DatFiles /// /// Overall item count /// - [JsonIgnore] + [JsonIgnore, XmlIgnore] public long TotalCount { get; private set; } = 0; /// /// Number of Adjuster items /// - [JsonIgnore] + [JsonIgnore, XmlIgnore] public long AdjusterCount { get; private set; } = 0; /// /// Number of Analog items /// - [JsonIgnore] + [JsonIgnore, XmlIgnore] public long AnalogCount { get; private set; } = 0; /// /// Number of Archive items /// - [JsonIgnore] + [JsonIgnore, XmlIgnore] public long ArchiveCount { get; private set; } = 0; /// /// Number of BiosSet items /// - [JsonIgnore] + [JsonIgnore, XmlIgnore] public long BiosSetCount { get; private set; } = 0; /// /// Number of Chip items /// - [JsonIgnore] + [JsonIgnore, XmlIgnore] public long ChipCount { get; private set; } = 0; /// /// Number of top-level Condition items /// - [JsonIgnore] + [JsonIgnore, XmlIgnore] public long ConditionCount { get; private set; } = 0; /// /// Number of Configuration items /// - [JsonIgnore] + [JsonIgnore, XmlIgnore] public long ConfigurationCount { get; private set; } = 0; /// /// Number of DataArea items /// - [JsonIgnore] + [JsonIgnore, XmlIgnore] public long DataAreaCount { get; private set; } = 0; /// /// Number of Device items /// - [JsonIgnore] + [JsonIgnore, XmlIgnore] public long DeviceCount { get; private set; } = 0; /// /// Number of Device Reference items /// - [JsonIgnore] + [JsonIgnore, XmlIgnore] public long DeviceReferenceCount { get; private set; } = 0; /// /// Number of DIP Switch items /// - [JsonIgnore] + [JsonIgnore, XmlIgnore] public long DipSwitchCount { get; private set; } = 0; /// @@ -152,202 +155,202 @@ namespace SabreTools.Library.DatFiles /// /// Number of DiskArea items /// - [JsonIgnore] + [JsonIgnore, XmlIgnore] public long DiskAreaCount { get; private set; } = 0; /// /// Number of Display items /// - [JsonIgnore] + [JsonIgnore, XmlIgnore] public long DisplayCount { get; private set; } = 0; /// /// Number of Driver items /// - [JsonIgnore] + [JsonIgnore, XmlIgnore] public long DriverCount { get; private set; } = 0; /// /// Number of Feature items /// - [JsonIgnore] + [JsonIgnore, XmlIgnore] public long FeatureCount { get; private set; } = 0; /// /// Number of Info items /// - [JsonIgnore] + [JsonIgnore, XmlIgnore] public long InfoCount { get; private set; } = 0; /// /// Number of Input items /// - [JsonIgnore] + [JsonIgnore, XmlIgnore] public long InputCount { get; private set; } = 0; /// /// Number of Media items /// - [JsonIgnore] + [JsonIgnore, XmlIgnore] public long MediaCount { get; private set; } = 0; /// /// Number of Part items /// - [JsonIgnore] + [JsonIgnore, XmlIgnore] public long PartCount { get; private set; } = 0; /// /// Number of PartFeature items /// - [JsonIgnore] + [JsonIgnore, XmlIgnore] public long PartFeatureCount { get; private set; } = 0; /// /// Number of Port items /// - [JsonIgnore] + [JsonIgnore, XmlIgnore] public long PortCount { get; private set; } = 0; /// /// Number of RamOption items /// - [JsonIgnore] + [JsonIgnore, XmlIgnore] public long RamOptionCount { get; private set; } = 0; /// /// Number of Release items /// - [JsonIgnore] + [JsonIgnore, XmlIgnore] public long ReleaseCount { get; private set; } = 0; /// /// Number of Rom items /// - [JsonIgnore] + [JsonIgnore, XmlIgnore] public long RomCount { get; private set; } = 0; /// /// Number of Sample items /// - [JsonIgnore] + [JsonIgnore, XmlIgnore] public long SampleCount { get; private set; } = 0; /// /// Number of SharedFeature items /// - [JsonIgnore] + [JsonIgnore, XmlIgnore] public long SharedFeatureCount { get; private set; } = 0; /// /// Number of Slot items /// - [JsonIgnore] + [JsonIgnore, XmlIgnore] public long SlotCount { get; private set; } = 0; /// /// Number of SoftwareList items /// - [JsonIgnore] + [JsonIgnore, XmlIgnore] public long SoftwareListCount { get; private set; } = 0; /// /// Number of Sound items /// - [JsonIgnore] + [JsonIgnore, XmlIgnore] public long SoundCount { get; private set; } = 0; /// /// Number of machines /// /// Special count only used by statistics output - [JsonIgnore] + [JsonIgnore, XmlIgnore] public long GameCount { get; private set; } = 0; /// /// Total uncompressed size /// - [JsonIgnore] + [JsonIgnore, XmlIgnore] public long TotalSize { get; private set; } = 0; /// /// Number of items with a CRC hash /// - [JsonIgnore] + [JsonIgnore, XmlIgnore] public long CRCCount { get; private set; } = 0; /// /// Number of items with an MD5 hash /// - [JsonIgnore] + [JsonIgnore, XmlIgnore] public long MD5Count { get; private set; } = 0; #if NET_FRAMEWORK /// /// Number of items with a RIPEMD160 hash /// - [JsonIgnore] + [JsonIgnore, XmlIgnore] public long RIPEMD160Count { get; private set; } = 0; #endif /// /// Number of items with a SHA-1 hash /// - [JsonIgnore] + [JsonIgnore, XmlIgnore] public long SHA1Count { get; private set; } = 0; /// /// Number of items with a SHA-256 hash /// - [JsonIgnore] + [JsonIgnore, XmlIgnore] public long SHA256Count { get; private set; } = 0; /// /// Number of items with a SHA-384 hash /// - [JsonIgnore] + [JsonIgnore, XmlIgnore] public long SHA384Count { get; private set; } = 0; /// /// Number of items with a SHA-512 hash /// - [JsonIgnore] + [JsonIgnore, XmlIgnore] public long SHA512Count { get; private set; } = 0; /// /// Number of items with a SpamSum fuzzy hash /// - [JsonIgnore] + [JsonIgnore, XmlIgnore] public long SpamSumCount { get; private set; } = 0; /// /// Number of items with the baddump status /// - [JsonIgnore] + [JsonIgnore, XmlIgnore] public long BaddumpCount { get; private set; } = 0; /// /// Number of items with the good status /// - [JsonIgnore] + [JsonIgnore, XmlIgnore] public long GoodCount { get; private set; } = 0; /// /// Number of items with the nodump status /// - [JsonIgnore] + [JsonIgnore, XmlIgnore] public long NodumpCount { get; private set; } = 0; /// /// Number of items with the remove flag /// - [JsonIgnore] + [JsonIgnore, XmlIgnore] public long RemovedCount { get; private set; } = 0; /// /// Number of items with the verified status /// - [JsonIgnore] + [JsonIgnore, XmlIgnore] public long VerifiedCount { get; private set; } = 0; #endregion diff --git a/SabreTools.Library/DatItems/Adjuster.cs b/SabreTools.Library/DatItems/Adjuster.cs index ed8c65f5..cece2061 100644 --- a/SabreTools.Library/DatItems/Adjuster.cs +++ b/SabreTools.Library/DatItems/Adjuster.cs @@ -12,8 +12,7 @@ namespace SabreTools.Library.DatItems /// /// Represents which Adjuster(s) is associated with a set /// - [JsonObject("adjuster")] - [XmlRoot("adjuster")] + [JsonObject("adjuster"), XmlRoot("adjuster")] public class Adjuster : DatItem { #region Fields diff --git a/SabreTools.Library/DatItems/Analog.cs b/SabreTools.Library/DatItems/Analog.cs index 3ceae77e..0fadbb2c 100644 --- a/SabreTools.Library/DatItems/Analog.cs +++ b/SabreTools.Library/DatItems/Analog.cs @@ -10,8 +10,7 @@ namespace SabreTools.Library.DatItems /// /// Represents a single analog item /// - [JsonObject("analog")] - [XmlRoot("analog")] + [JsonObject("analog"), XmlRoot("analog")] public class Analog : DatItem { #region Fields diff --git a/SabreTools.Library/DatItems/Archive.cs b/SabreTools.Library/DatItems/Archive.cs index f8caf799..eddf6a95 100644 --- a/SabreTools.Library/DatItems/Archive.cs +++ b/SabreTools.Library/DatItems/Archive.cs @@ -12,8 +12,7 @@ namespace SabreTools.Library.DatItems /// /// Represents generic archive files to be included in a set /// - [JsonObject("archive")] - [XmlRoot("archive")] + [JsonObject("archive"), XmlRoot("archive")] public class Archive : DatItem { #region Fields diff --git a/SabreTools.Library/DatItems/Auxiliary.cs b/SabreTools.Library/DatItems/Auxiliary.cs index 99397f35..311d22ec 100644 --- a/SabreTools.Library/DatItems/Auxiliary.cs +++ b/SabreTools.Library/DatItems/Auxiliary.cs @@ -14,8 +14,7 @@ namespace SabreTools.Library.DatItems /// /// Represents the OpenMSX original value /// - [JsonObject("original")] - [XmlRoot("original")] + [JsonObject("original"), XmlRoot("original")] public class Original { [JsonProperty("value")] diff --git a/SabreTools.Library/DatItems/BiosSet.cs b/SabreTools.Library/DatItems/BiosSet.cs index 65b93278..5f489b57 100644 --- a/SabreTools.Library/DatItems/BiosSet.cs +++ b/SabreTools.Library/DatItems/BiosSet.cs @@ -12,8 +12,7 @@ namespace SabreTools.Library.DatItems /// /// Represents which BIOS(es) is associated with a set /// - [JsonObject("biosset")] - [XmlRoot("biosset")] + [JsonObject("biosset"), XmlRoot("biosset")] public class BiosSet : DatItem { #region Fields diff --git a/SabreTools.Library/DatItems/Blank.cs b/SabreTools.Library/DatItems/Blank.cs index b2cd3f08..bdd182ca 100644 --- a/SabreTools.Library/DatItems/Blank.cs +++ b/SabreTools.Library/DatItems/Blank.cs @@ -7,8 +7,7 @@ namespace SabreTools.Library.DatItems /// /// Represents a blank set from an input DAT /// - [JsonObject("blank")] - [XmlRoot("blank")] + [JsonObject("blank"), XmlRoot("blank")] public class Blank : DatItem { #region Constructors diff --git a/SabreTools.Library/DatItems/Chip.cs b/SabreTools.Library/DatItems/Chip.cs index d40022f7..23d2566c 100644 --- a/SabreTools.Library/DatItems/Chip.cs +++ b/SabreTools.Library/DatItems/Chip.cs @@ -14,8 +14,7 @@ namespace SabreTools.Library.DatItems /// /// Represents which Chip(s) is associated with a set /// - [JsonObject("chip")] - [XmlRoot("chip")] + [JsonObject("chip"), XmlRoot("chip")] public class Chip : DatItem { #region Fields diff --git a/SabreTools.Library/DatItems/Condition.cs b/SabreTools.Library/DatItems/Condition.cs index ed1c6d95..b95e1a60 100644 --- a/SabreTools.Library/DatItems/Condition.cs +++ b/SabreTools.Library/DatItems/Condition.cs @@ -12,8 +12,7 @@ namespace SabreTools.Library.DatItems /// /// Represents a condition on a machine or other item /// - [JsonObject("condition")] - [XmlRoot("condition")] + [JsonObject("condition"), XmlRoot("condition")] public class Condition : DatItem { #region Fields diff --git a/SabreTools.Library/DatItems/Configuration.cs b/SabreTools.Library/DatItems/Configuration.cs index 7c0c1c1a..764bddd0 100644 --- a/SabreTools.Library/DatItems/Configuration.cs +++ b/SabreTools.Library/DatItems/Configuration.cs @@ -12,8 +12,7 @@ namespace SabreTools.Library.DatItems /// /// Represents which Configuration(s) is associated with a set /// - [JsonObject("configuration")] - [XmlRoot("configuration")] + [JsonObject("configuration"), XmlRoot("configuration")] public class Configuration : DatItem { #region Fields diff --git a/SabreTools.Library/DatItems/Control.cs b/SabreTools.Library/DatItems/Control.cs index 12afebd6..5e926292 100644 --- a/SabreTools.Library/DatItems/Control.cs +++ b/SabreTools.Library/DatItems/Control.cs @@ -13,8 +13,7 @@ namespace SabreTools.Library.DatItems /// /// Represents control for an input /// - [JsonObject("control")] - [XmlRoot("control")] + [JsonObject("control"), XmlRoot("control")] public class Control : DatItem { #region Fields diff --git a/SabreTools.Library/DatItems/DatItem.cs b/SabreTools.Library/DatItems/DatItem.cs index 79ed15c4..79513815 100644 --- a/SabreTools.Library/DatItems/DatItem.cs +++ b/SabreTools.Library/DatItems/DatItem.cs @@ -17,8 +17,7 @@ namespace SabreTools.Library.DatItems /// /// Base class for all items included in a set /// - [JsonObject("datitem")] - [XmlRoot("datitem")] + [JsonObject("datitem"), XmlRoot("datitem")] [XmlInclude(typeof(Adjuster))] [XmlInclude(typeof(Analog))] [XmlInclude(typeof(Archive))] @@ -73,8 +72,7 @@ namespace SabreTools.Library.DatItems /// /// Duplicate type when compared to another item /// - [JsonIgnore] - [XmlIgnore] + [JsonIgnore, XmlIgnore] public DupeType DupeType { get; set; } #endregion @@ -84,8 +82,7 @@ namespace SabreTools.Library.DatItems /// /// Machine values /// - [JsonIgnore] - [XmlIgnore] + [JsonIgnore, XmlIgnore] public Machine Machine { get; set; } = new Machine(); #endregion @@ -95,15 +92,13 @@ namespace SabreTools.Library.DatItems /// /// Source information /// - [JsonIgnore] - [XmlIgnore] + [JsonIgnore, XmlIgnore] public Source Source { get; set; } = new Source(); /// /// Flag if item should be removed /// - [JsonIgnore] - [XmlIgnore] + [JsonIgnore, XmlIgnore] public bool Remove { get; set; } #endregion diff --git a/SabreTools.Library/DatItems/DataArea.cs b/SabreTools.Library/DatItems/DataArea.cs index 0be4d43d..5d41bcf7 100644 --- a/SabreTools.Library/DatItems/DataArea.cs +++ b/SabreTools.Library/DatItems/DataArea.cs @@ -14,8 +14,7 @@ namespace SabreTools.Library.DatItems /// SoftwareList dataarea information /// /// One DataArea can contain multiple Rom items - [JsonObject("dataarea")] - [XmlRoot("dataarea")] + [JsonObject("dataarea"), XmlRoot("dataarea")] public class DataArea : DatItem { #region Fields diff --git a/SabreTools.Library/DatItems/Device.cs b/SabreTools.Library/DatItems/Device.cs index 02999ae7..97ab7f9e 100644 --- a/SabreTools.Library/DatItems/Device.cs +++ b/SabreTools.Library/DatItems/Device.cs @@ -12,8 +12,7 @@ namespace SabreTools.Library.DatItems /// /// Represents a single device on the machine /// - [JsonObject("device")] - [XmlRoot("device")] + [JsonObject("device"), XmlRoot("device")] public class Device : DatItem { #region Fields diff --git a/SabreTools.Library/DatItems/DeviceReference.cs b/SabreTools.Library/DatItems/DeviceReference.cs index c0c2842b..6c779886 100644 --- a/SabreTools.Library/DatItems/DeviceReference.cs +++ b/SabreTools.Library/DatItems/DeviceReference.cs @@ -12,8 +12,7 @@ namespace SabreTools.Library.DatItems /// /// Represents which Device Reference(s) is associated with a set /// - [JsonObject("device_ref")] - [XmlRoot("device_ref")] + [JsonObject("device_ref"), XmlRoot("device_ref")] public class DeviceReference : DatItem { #region Fields diff --git a/SabreTools.Library/DatItems/DipSwitch.cs b/SabreTools.Library/DatItems/DipSwitch.cs index 42187016..d8f3e13e 100644 --- a/SabreTools.Library/DatItems/DipSwitch.cs +++ b/SabreTools.Library/DatItems/DipSwitch.cs @@ -12,8 +12,7 @@ namespace SabreTools.Library.DatItems /// /// Represents which DIP Switch(es) is associated with a set /// - [JsonObject("dipswitch")] - [XmlRoot("dipswitch")] + [JsonObject("dipswitch"), XmlRoot("dipswitch")] public class DipSwitch : DatItem { #region Fields diff --git a/SabreTools.Library/DatItems/Disk.cs b/SabreTools.Library/DatItems/Disk.cs index 7abd62b7..185a5286 100644 --- a/SabreTools.Library/DatItems/Disk.cs +++ b/SabreTools.Library/DatItems/Disk.cs @@ -14,8 +14,7 @@ namespace SabreTools.Library.DatItems /// /// Represents Compressed Hunks of Data (CHD) formatted disks which use internal hashes /// - [JsonObject("disk")] - [XmlRoot("disk")] + [JsonObject("disk"), XmlRoot("disk")] public class Disk : DatItem { #region Private instance variables diff --git a/SabreTools.Library/DatItems/DiskArea.cs b/SabreTools.Library/DatItems/DiskArea.cs index 41983885..ab47ca7c 100644 --- a/SabreTools.Library/DatItems/DiskArea.cs +++ b/SabreTools.Library/DatItems/DiskArea.cs @@ -14,8 +14,7 @@ namespace SabreTools.Library.DatItems /// SoftwareList diskarea information /// /// One DiskArea can contain multiple Disk items - [JsonObject("diskarea")] - [XmlRoot("diskarea")] + [JsonObject("diskarea"), XmlRoot("diskarea")] public class DiskArea : DatItem { #region Fields diff --git a/SabreTools.Library/DatItems/Display.cs b/SabreTools.Library/DatItems/Display.cs index a8142fde..d0a6ed1b 100644 --- a/SabreTools.Library/DatItems/Display.cs +++ b/SabreTools.Library/DatItems/Display.cs @@ -13,8 +13,7 @@ namespace SabreTools.Library.DatItems /// /// Represents one machine display /// - [JsonObject("display")] - [XmlRoot("display")] + [JsonObject("display"), XmlRoot("display")] public class Display : DatItem { #region Fields diff --git a/SabreTools.Library/DatItems/Driver.cs b/SabreTools.Library/DatItems/Driver.cs index 89572862..f43c9786 100644 --- a/SabreTools.Library/DatItems/Driver.cs +++ b/SabreTools.Library/DatItems/Driver.cs @@ -12,8 +12,7 @@ namespace SabreTools.Library.DatItems /// /// Represents the a driver of the machine /// - [JsonObject("driver")] - [XmlRoot("driver")] + [JsonObject("driver"), XmlRoot("driver")] public class Driver : DatItem { #region Fields diff --git a/SabreTools.Library/DatItems/Extension.cs b/SabreTools.Library/DatItems/Extension.cs index 6411109a..b63c6cb3 100644 --- a/SabreTools.Library/DatItems/Extension.cs +++ b/SabreTools.Library/DatItems/Extension.cs @@ -12,8 +12,7 @@ namespace SabreTools.Library.DatItems /// /// Represents a matchable extension /// - [JsonObject("extension")] - [XmlRoot("extension")] + [JsonObject("extension"), XmlRoot("extension")] public class Extension : DatItem { #region Fields diff --git a/SabreTools.Library/DatItems/Feature.cs b/SabreTools.Library/DatItems/Feature.cs index c99968ce..493f3cff 100644 --- a/SabreTools.Library/DatItems/Feature.cs +++ b/SabreTools.Library/DatItems/Feature.cs @@ -12,8 +12,7 @@ namespace SabreTools.Library.DatItems /// /// Represents the a feature of the machine /// - [JsonObject("feature")] - [XmlRoot("feature")] + [JsonObject("feature"), XmlRoot("feature")] public class Feature : DatItem { #region Fields diff --git a/SabreTools.Library/DatItems/Info.cs b/SabreTools.Library/DatItems/Info.cs index 4ec9d643..09dd9400 100644 --- a/SabreTools.Library/DatItems/Info.cs +++ b/SabreTools.Library/DatItems/Info.cs @@ -12,8 +12,7 @@ namespace SabreTools.Library.DatItems /// /// Represents special information about a machine /// - [JsonObject("info")] - [XmlRoot("info")] + [JsonObject("info"), XmlRoot("info")] public class Info : DatItem { #region Fields diff --git a/SabreTools.Library/DatItems/Input.cs b/SabreTools.Library/DatItems/Input.cs index 5167405d..17462f68 100644 --- a/SabreTools.Library/DatItems/Input.cs +++ b/SabreTools.Library/DatItems/Input.cs @@ -12,8 +12,7 @@ namespace SabreTools.Library.DatItems /// /// Represents one ListXML input /// - [JsonObject("input")] - [XmlRoot("input")] + [JsonObject("input"), XmlRoot("input")] public class Input : DatItem { #region Fields diff --git a/SabreTools.Library/DatItems/Instance.cs b/SabreTools.Library/DatItems/Instance.cs index be813141..a1165d25 100644 --- a/SabreTools.Library/DatItems/Instance.cs +++ b/SabreTools.Library/DatItems/Instance.cs @@ -12,8 +12,7 @@ namespace SabreTools.Library.DatItems /// /// Represents a single instance of another item /// - [JsonObject("instance")] - [XmlRoot("instance")] + [JsonObject("instance"), XmlRoot("instance")] public class Instance : DatItem { #region Fields diff --git a/SabreTools.Library/DatItems/Location.cs b/SabreTools.Library/DatItems/Location.cs index 3910e73a..2040a717 100644 --- a/SabreTools.Library/DatItems/Location.cs +++ b/SabreTools.Library/DatItems/Location.cs @@ -12,8 +12,7 @@ namespace SabreTools.Library.DatItems /// /// Represents one conflocation or diplocation /// - [JsonObject("location")] - [XmlRoot("location")] + [JsonObject("location"), XmlRoot("location")] public class Location : DatItem { #region Fields diff --git a/SabreTools.Library/DatItems/Machine.cs b/SabreTools.Library/DatItems/Machine.cs index 653a69bd..949aedf3 100644 --- a/SabreTools.Library/DatItems/Machine.cs +++ b/SabreTools.Library/DatItems/Machine.cs @@ -13,8 +13,7 @@ namespace SabreTools.Library.DatItems /// /// Represents the information specific to a set/game/machine /// - [JsonObject("machine")] - [XmlRoot("machine")] + [JsonObject("machine"), XmlRoot("machine")] public class Machine : ICloneable { #region Fields diff --git a/SabreTools.Library/DatItems/Media.cs b/SabreTools.Library/DatItems/Media.cs index 9be6b5ad..ec99d22f 100644 --- a/SabreTools.Library/DatItems/Media.cs +++ b/SabreTools.Library/DatItems/Media.cs @@ -14,8 +14,7 @@ namespace SabreTools.Library.DatItems /// /// Represents Aaruformat images which use internal hashes /// - [JsonObject("media")] - [XmlRoot("media")] + [JsonObject("media"), XmlRoot("media")] public class Media : DatItem { #region Private instance variables diff --git a/SabreTools.Library/DatItems/Part.cs b/SabreTools.Library/DatItems/Part.cs index 4ce5cee8..4c84d269 100644 --- a/SabreTools.Library/DatItems/Part.cs +++ b/SabreTools.Library/DatItems/Part.cs @@ -14,8 +14,7 @@ namespace SabreTools.Library.DatItems /// SoftwareList part information /// /// One Part can contain multiple PartFeature, DataArea, DiskArea, and DipSwitch items - [JsonObject("part")] - [XmlRoot("part")] + [JsonObject("part"), XmlRoot("part")] public class Part : DatItem { #region Fields diff --git a/SabreTools.Library/DatItems/PartFeature.cs b/SabreTools.Library/DatItems/PartFeature.cs index a8810c90..1674fab1 100644 --- a/SabreTools.Library/DatItems/PartFeature.cs +++ b/SabreTools.Library/DatItems/PartFeature.cs @@ -12,8 +12,7 @@ namespace SabreTools.Library.DatItems /// /// Represents one part feature object /// - [JsonObject("part_feature")] - [XmlRoot("part_feature")] + [JsonObject("part_feature"), XmlRoot("part_feature")] public class PartFeature : DatItem { #region Fields diff --git a/SabreTools.Library/DatItems/Port.cs b/SabreTools.Library/DatItems/Port.cs index bb319a22..90689094 100644 --- a/SabreTools.Library/DatItems/Port.cs +++ b/SabreTools.Library/DatItems/Port.cs @@ -10,8 +10,7 @@ namespace SabreTools.Library.DatItems /// /// Represents a single port on a machine /// - [JsonObject("port")] - [XmlRoot("port")] + [JsonObject("port"), XmlRoot("port")] public class Port : DatItem { #region Fields diff --git a/SabreTools.Library/DatItems/RamOption.cs b/SabreTools.Library/DatItems/RamOption.cs index ec91d3d0..2313ba92 100644 --- a/SabreTools.Library/DatItems/RamOption.cs +++ b/SabreTools.Library/DatItems/RamOption.cs @@ -12,8 +12,7 @@ namespace SabreTools.Library.DatItems /// /// Represents which RAM option(s) is associated with a set /// - [JsonObject("ramoption")] - [XmlRoot("ramoption")] + [JsonObject("ramoption"), XmlRoot("ramoption")] public class RamOption : DatItem { #region Fields diff --git a/SabreTools.Library/DatItems/Release.cs b/SabreTools.Library/DatItems/Release.cs index 0b80fa8d..110bab55 100644 --- a/SabreTools.Library/DatItems/Release.cs +++ b/SabreTools.Library/DatItems/Release.cs @@ -12,8 +12,7 @@ namespace SabreTools.Library.DatItems /// /// Represents release information about a set /// - [JsonObject("release")] - [XmlRoot("release")] + [JsonObject("release"), XmlRoot("release")] public class Release : DatItem { #region Fields diff --git a/SabreTools.Library/DatItems/Rom.cs b/SabreTools.Library/DatItems/Rom.cs index 0fca228f..4e733447 100644 --- a/SabreTools.Library/DatItems/Rom.cs +++ b/SabreTools.Library/DatItems/Rom.cs @@ -17,8 +17,7 @@ namespace SabreTools.Library.DatItems /// /// Represents a generic file within a set /// - [JsonObject("rom")] - [XmlRoot("rom")] + [JsonObject("rom"), XmlRoot("rom")] public class Rom : DatItem { #region Private instance variables diff --git a/SabreTools.Library/DatItems/Sample.cs b/SabreTools.Library/DatItems/Sample.cs index 2ba74eb2..3ff4f308 100644 --- a/SabreTools.Library/DatItems/Sample.cs +++ b/SabreTools.Library/DatItems/Sample.cs @@ -12,8 +12,7 @@ namespace SabreTools.Library.DatItems /// /// Represents a (usually WAV-formatted) sample to be included for use in the set /// - [JsonObject("sample")] - [XmlRoot("sample")] + [JsonObject("sample"), XmlRoot("sample")] public class Sample : DatItem { #region Fields diff --git a/SabreTools.Library/DatItems/Setting.cs b/SabreTools.Library/DatItems/Setting.cs index 869b3c61..fa6eb7b9 100644 --- a/SabreTools.Library/DatItems/Setting.cs +++ b/SabreTools.Library/DatItems/Setting.cs @@ -12,8 +12,7 @@ namespace SabreTools.Library.DatItems /// /// Represents one ListXML confsetting or dipvalue /// - [JsonObject("setting")] - [XmlRoot("setting")] + [JsonObject("setting"), XmlRoot("setting")] public class Setting : DatItem { #region Fields diff --git a/SabreTools.Library/DatItems/SharedFeature.cs b/SabreTools.Library/DatItems/SharedFeature.cs index 2c1d2a9f..ba9dbc1e 100644 --- a/SabreTools.Library/DatItems/SharedFeature.cs +++ b/SabreTools.Library/DatItems/SharedFeature.cs @@ -12,8 +12,7 @@ namespace SabreTools.Library.DatItems /// /// Represents one shared feature object /// - [JsonObject("sharedfeat")] - [XmlRoot("sharedfeat")] + [JsonObject("sharedfeat"), XmlRoot("sharedfeat")] public class SharedFeature : DatItem { #region Fields diff --git a/SabreTools.Library/DatItems/Slot.cs b/SabreTools.Library/DatItems/Slot.cs index 22c9ac91..42d69528 100644 --- a/SabreTools.Library/DatItems/Slot.cs +++ b/SabreTools.Library/DatItems/Slot.cs @@ -12,8 +12,7 @@ namespace SabreTools.Library.DatItems /// /// Represents which Slot(s) is associated with a set /// - [JsonObject("slot")] - [XmlRoot("slot")] + [JsonObject("slot"), XmlRoot("slot")] public class Slot : DatItem { #region Fields diff --git a/SabreTools.Library/DatItems/SlotOption.cs b/SabreTools.Library/DatItems/SlotOption.cs index 280bc8fc..8dd615d2 100644 --- a/SabreTools.Library/DatItems/SlotOption.cs +++ b/SabreTools.Library/DatItems/SlotOption.cs @@ -12,8 +12,7 @@ namespace SabreTools.Library.DatItems /// /// Represents one ListXML slotoption /// - [JsonObject("slotoption")] - [XmlRoot("slotoption")] + [JsonObject("slotoption"), XmlRoot("slotoption")] public class SlotOption : DatItem { #region Fields diff --git a/SabreTools.Library/DatItems/SoftwareList.cs b/SabreTools.Library/DatItems/SoftwareList.cs index 3db2d8f9..242a24f3 100644 --- a/SabreTools.Library/DatItems/SoftwareList.cs +++ b/SabreTools.Library/DatItems/SoftwareList.cs @@ -13,8 +13,7 @@ namespace SabreTools.Library.DatItems /// /// Represents which SoftwareList(s) is associated with a set /// - [JsonObject("softwarelist")] - [XmlRoot("softwarelist")] + [JsonObject("softwarelist"), XmlRoot("softwarelist")] public class SoftwareList : DatItem { #region Fields diff --git a/SabreTools.Library/DatItems/Sound.cs b/SabreTools.Library/DatItems/Sound.cs index 6f70322f..a5334aeb 100644 --- a/SabreTools.Library/DatItems/Sound.cs +++ b/SabreTools.Library/DatItems/Sound.cs @@ -12,8 +12,7 @@ namespace SabreTools.Library.DatItems /// /// Represents the sound output for a machine /// - [JsonObject("sound")] - [XmlRoot("sound")] + [JsonObject("sound"), XmlRoot("sound")] public class Sound : DatItem { #region Fields