2020-12-14 10:58:43 -08:00
|
|
|
|
using System.Xml.Serialization;
|
2020-08-23 22:23:55 -07:00
|
|
|
|
using Newtonsoft.Json;
|
2025-01-11 22:00:26 -05:00
|
|
|
|
using SabreTools.Core.Tools;
|
2016-10-12 16:02:51 -07:00
|
|
|
|
|
2021-02-02 10:23:43 -08:00
|
|
|
|
namespace SabreTools.DatItems.Formats
|
2016-09-19 18:04:24 -07:00
|
|
|
|
{
|
2019-01-08 17:40:12 -08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Represents which BIOS(es) is associated with a set
|
|
|
|
|
|
/// </summary>
|
2020-09-08 10:12:41 -07:00
|
|
|
|
[JsonObject("biosset"), XmlRoot("biosset")]
|
2024-03-10 20:39:54 -04:00
|
|
|
|
public sealed class BiosSet : DatItem<Models.Metadata.BiosSet>
|
2019-01-08 17:40:12 -08:00
|
|
|
|
{
|
2024-03-10 20:39:54 -04:00
|
|
|
|
#region Fields
|
2020-08-17 17:28:32 -07:00
|
|
|
|
|
2024-03-10 20:39:54 -04:00
|
|
|
|
/// <inheritdoc>/>
|
2024-03-12 13:00:34 -04:00
|
|
|
|
protected override ItemType ItemType => ItemType.BiosSet;
|
2020-09-02 12:19:12 -07:00
|
|
|
|
|
2024-03-10 20:39:54 -04:00
|
|
|
|
/// <inheritdoc>/>
|
|
|
|
|
|
protected override string? NameKey => Models.Metadata.BiosSet.NameKey;
|
2020-12-13 14:01:16 -08:00
|
|
|
|
|
2020-08-17 17:28:32 -07:00
|
|
|
|
#endregion
|
|
|
|
|
|
|
2019-01-08 17:40:12 -08:00
|
|
|
|
#region Constructors
|
|
|
|
|
|
|
2024-03-10 20:39:54 -04:00
|
|
|
|
public BiosSet() : base() { }
|
2025-01-11 23:34:26 -05:00
|
|
|
|
|
2025-01-11 22:00:26 -05:00
|
|
|
|
public BiosSet(Models.Metadata.BiosSet item) : base(item)
|
|
|
|
|
|
{
|
|
|
|
|
|
// Process flag values
|
|
|
|
|
|
if (GetBoolFieldValue(Models.Metadata.BiosSet.DefaultKey) != null)
|
|
|
|
|
|
SetFieldValue<string?>(Models.Metadata.BiosSet.DefaultKey, GetBoolFieldValue(Models.Metadata.BiosSet.DefaultKey).FromYesNo());
|
|
|
|
|
|
}
|
2019-01-08 17:40:12 -08:00
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
}
|
2016-09-19 18:04:24 -07:00
|
|
|
|
}
|