mirror of
https://github.com/SabreTools/SabreTools.Serialization.git
synced 2026-04-21 21:59:47 +00:00
40 lines
1.1 KiB
C#
40 lines
1.1 KiB
C#
using System.Xml.Serialization;
|
|
using Newtonsoft.Json;
|
|
|
|
namespace SabreTools.Metadata.DatItems.Formats
|
|
{
|
|
/// <summary>
|
|
/// Represents which RAM option(s) is associated with a set
|
|
/// </summary>
|
|
[JsonObject("ramoption"), XmlRoot("ramoption")]
|
|
public sealed class RamOption : DatItem<Data.Models.Metadata.RamOption>
|
|
{
|
|
#region Fields
|
|
|
|
/// <inheritdoc>/>
|
|
protected override ItemType ItemType => ItemType.RamOption;
|
|
|
|
#endregion
|
|
|
|
#region Constructors
|
|
|
|
public RamOption() : base() { }
|
|
|
|
public RamOption(Data.Models.Metadata.RamOption item) : base(item)
|
|
{
|
|
// Process flag values
|
|
bool? defaultValue = ReadBool(Data.Models.Metadata.RamOption.DefaultKey);
|
|
if (defaultValue is not null)
|
|
Write<string?>(Data.Models.Metadata.RamOption.DefaultKey, defaultValue.FromYesNo());
|
|
}
|
|
|
|
public RamOption(Data.Models.Metadata.RamOption item, Machine machine, Source source) : this(item)
|
|
{
|
|
Write<Source?>(SourceKey, source);
|
|
CopyMachineInformation(machine);
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
}
|