mirror of
https://github.com/SabreTools/SabreTools.Serialization.git
synced 2026-04-05 22:01:33 +00:00
40 lines
1.2 KiB
C#
40 lines
1.2 KiB
C#
using System.Xml.Serialization;
|
|
using Newtonsoft.Json;
|
|
using SabreTools.Metadata.Tools;
|
|
|
|
namespace SabreTools.Metadata.DatItems.Formats
|
|
{
|
|
/// <summary>
|
|
/// Represents which BIOS(es) is associated with a set
|
|
/// </summary>
|
|
[JsonObject("biosset"), XmlRoot("biosset")]
|
|
public sealed class BiosSet : DatItem<Data.Models.Metadata.BiosSet>
|
|
{
|
|
#region Fields
|
|
|
|
/// <inheritdoc>/>
|
|
protected override ItemType ItemType => ItemType.BiosSet;
|
|
|
|
#endregion
|
|
|
|
#region Constructors
|
|
|
|
public BiosSet() : base() { }
|
|
|
|
public BiosSet(Data.Models.Metadata.BiosSet item) : base(item)
|
|
{
|
|
// Process flag values
|
|
if (GetBoolFieldValue(Data.Models.Metadata.BiosSet.DefaultKey) is not null)
|
|
SetFieldValue<string?>(Data.Models.Metadata.BiosSet.DefaultKey, GetBoolFieldValue(Data.Models.Metadata.BiosSet.DefaultKey).FromYesNo());
|
|
}
|
|
|
|
public BiosSet(Data.Models.Metadata.BiosSet item, Machine machine, Source source) : this(item)
|
|
{
|
|
SetFieldValue<Source?>(SourceKey, source);
|
|
CopyMachineInformation(machine);
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
}
|