using System.Xml.Serialization; using Newtonsoft.Json; using SabreTools.Data.Extensions; namespace SabreTools.Metadata.DatItems.Formats { /// /// Represents which BIOS(es) is associated with a set /// [JsonObject("biosset"), XmlRoot("biosset")] public sealed class BiosSet : DatItem { #region Fields /// /> protected override ItemType ItemType => ItemType.BiosSet; #endregion #region Constructors public BiosSet() : base() { } public BiosSet(Data.Models.Metadata.BiosSet item) : base(item) { // Process flag values bool? defaultValue = ReadBool(Data.Models.Metadata.BiosSet.DefaultKey); if (defaultValue is not null) Write(Data.Models.Metadata.BiosSet.DefaultKey, defaultValue.FromYesNo()); } public BiosSet(Data.Models.Metadata.BiosSet item, Machine machine, Source source) : this(item) { Write(SourceKey, source); CopyMachineInformation(machine); } #endregion #region Cloning Methods /// public override object Clone() => new BiosSet(_internal.Clone() as Data.Models.Metadata.BiosSet ?? []); #endregion } }