Files
SabreTools/SabreTools.DatItems/Formats/Auxiliary.cs
Matt Nadareski b37aed389e Add nullable context to SabreTools.DatItems
This change also starts migrating the internals of the DatItem formats to the new internal models. Right now, it's basically just acting like a wrapper around those models.
2023-08-14 13:17:51 -04:00

44 lines
1.1 KiB
C#

using System.Xml.Serialization;
using Newtonsoft.Json;
/// <summary>
/// This holds all of the auxiliary types needed for proper parsing
/// </summary>
namespace SabreTools.DatItems.Formats
{
#region DatItem
#region OpenMSX
/// <summary>
/// Represents the OpenMSX original value
/// </summary>
[JsonObject("original"), XmlRoot("original")]
public class Original
{
[JsonProperty("value"), XmlElement("value")]
public bool? Value
{
get => _original.ReadBool(Models.Internal.Original.ValueKey);
set => _original[Models.Internal.Original.ValueKey] = value;
}
[JsonProperty("content"), XmlElement("content")]
public string? Content
{
get => _original.ReadString(Models.Internal.Original.ContentKey);
set => _original[Models.Internal.Original.ContentKey] = value;
}
/// <summary>
/// Internal Original model
/// </summary>
[JsonIgnore]
private readonly Models.Internal.Original _original = new();
}
#endregion
#endregion //DatItem
}