mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Update formatting of DatItems
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
using System.Xml.Serialization;
|
||||
|
||||
using SabreTools.Core;
|
||||
using Newtonsoft.Json;
|
||||
using SabreTools.Core;
|
||||
|
||||
namespace SabreTools.DatItems.Formats
|
||||
{
|
||||
@@ -16,15 +15,13 @@ namespace SabreTools.DatItems.Formats
|
||||
/// <summary>
|
||||
/// Name of the item
|
||||
/// </summary>
|
||||
[JsonProperty("name")]
|
||||
[XmlElement("name")]
|
||||
[JsonProperty("name"), XmlElement("name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Determine whether the RamOption is default
|
||||
/// </summary>
|
||||
[JsonProperty("default", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
[XmlElement("default")]
|
||||
[JsonProperty("default", DefaultValueHandling = DefaultValueHandling.Ignore), XmlElement("default")]
|
||||
public bool? Default { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
@@ -33,8 +30,7 @@ namespace SabreTools.DatItems.Formats
|
||||
/// <summary>
|
||||
/// Determines the content of the RamOption
|
||||
/// </summary>
|
||||
[JsonProperty("content", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
[XmlElement("content")]
|
||||
[JsonProperty("content", DefaultValueHandling = DefaultValueHandling.Ignore), XmlElement("content")]
|
||||
public string Content { get; set; }
|
||||
|
||||
#endregion
|
||||
@@ -64,6 +60,7 @@ namespace SabreTools.DatItems.Formats
|
||||
|
||||
#region Cloning Methods
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override object Clone()
|
||||
{
|
||||
return new RamOption()
|
||||
@@ -85,6 +82,7 @@ namespace SabreTools.DatItems.Formats
|
||||
|
||||
#region Comparision Methods
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override bool Equals(DatItem other)
|
||||
{
|
||||
// If we don't have a RamOption, return false
|
||||
@@ -95,7 +93,9 @@ namespace SabreTools.DatItems.Formats
|
||||
RamOption newOther = other as RamOption;
|
||||
|
||||
// If the BiosSet information matches
|
||||
return (Name == newOther.Name && Default == newOther.Default && Content == newOther.Content);
|
||||
return (Name == newOther.Name
|
||||
&& Default == newOther.Default
|
||||
&& Content == newOther.Content);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user