2020-12-14 10:58:43 -08:00
|
|
|
|
using System.Xml.Serialization;
|
2020-08-31 23:26:07 -07:00
|
|
|
|
using Newtonsoft.Json;
|
2025-01-11 22:00:26 -05:00
|
|
|
|
using SabreTools.Core.Tools;
|
2020-08-31 23:26:07 -07:00
|
|
|
|
|
2021-02-02 10:23:43 -08:00
|
|
|
|
namespace SabreTools.DatItems.Formats
|
2020-08-31 23:26:07 -07:00
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Represents which SoftwareList(s) is associated with a set
|
|
|
|
|
|
/// </summary>
|
2020-09-08 10:12:41 -07:00
|
|
|
|
[JsonObject("softwarelist"), XmlRoot("softwarelist")]
|
2024-03-10 20:39:54 -04:00
|
|
|
|
public sealed class SoftwareList : DatItem<Models.Metadata.SoftwareList>
|
2020-08-31 23:26:07 -07:00
|
|
|
|
{
|
2024-03-10 20:39:54 -04:00
|
|
|
|
#region Fields
|
2020-08-31 23:26:07 -07:00
|
|
|
|
|
2024-03-10 20:39:54 -04:00
|
|
|
|
/// <inheritdoc>/>
|
|
|
|
|
|
protected override ItemType ItemType => ItemType.SoftwareList;
|
2020-09-02 12:19:12 -07:00
|
|
|
|
|
2024-03-10 20:39:54 -04:00
|
|
|
|
/// <inheritdoc>/>
|
|
|
|
|
|
protected override string? NameKey => Models.Metadata.SoftwareList.NameKey;
|
2020-12-13 14:01:16 -08:00
|
|
|
|
|
2020-08-31 23:26:07 -07:00
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region Constructors
|
|
|
|
|
|
|
2024-03-10 20:39:54 -04:00
|
|
|
|
public SoftwareList() : base() { }
|
2025-01-11 22:00:26 -05:00
|
|
|
|
public SoftwareList(Models.Metadata.SoftwareList item) : base(item)
|
|
|
|
|
|
{
|
|
|
|
|
|
// Process flag values
|
|
|
|
|
|
if (GetStringFieldValue(Models.Metadata.SoftwareList.StatusKey) != null)
|
|
|
|
|
|
SetFieldValue<string?>(Models.Metadata.SoftwareList.StatusKey, GetStringFieldValue(Models.Metadata.SoftwareList.StatusKey).AsEnumValue<SoftwareListStatus>().AsStringValue());
|
|
|
|
|
|
|
|
|
|
|
|
// Handle subitems
|
|
|
|
|
|
// TODO: Handle the Software subitem
|
|
|
|
|
|
}
|
2020-08-31 23:26:07 -07:00
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|