mirror of
https://github.com/SabreTools/SabreTools.Serialization.git
synced 2026-04-19 04:33:17 +00:00
42 lines
1.3 KiB
C#
42 lines
1.3 KiB
C#
using System.Xml.Serialization;
|
|
using Newtonsoft.Json;
|
|
|
|
namespace SabreTools.Metadata.DatItems.Formats
|
|
{
|
|
/// <summary>
|
|
/// Represents which SoftwareList(s) is associated with a set
|
|
/// </summary>
|
|
[JsonObject("softwarelist"), XmlRoot("softwarelist")]
|
|
public sealed class SoftwareList : DatItem<Data.Models.Metadata.SoftwareList>
|
|
{
|
|
#region Fields
|
|
|
|
/// <inheritdoc>/>
|
|
protected override ItemType ItemType => ItemType.SoftwareList;
|
|
|
|
#endregion
|
|
|
|
#region Constructors
|
|
|
|
public SoftwareList() : base() { }
|
|
|
|
public SoftwareList(Data.Models.Metadata.SoftwareList item) : base(item)
|
|
{
|
|
// Process flag values
|
|
if (GetStringFieldValue(Data.Models.Metadata.SoftwareList.StatusKey) is not null)
|
|
SetFieldValue<string?>(Data.Models.Metadata.SoftwareList.StatusKey, GetStringFieldValue(Data.Models.Metadata.SoftwareList.StatusKey).AsSoftwareListStatus().AsStringValue());
|
|
|
|
// Handle subitems
|
|
// TODO: Handle the Software subitem
|
|
}
|
|
|
|
public SoftwareList(Data.Models.Metadata.SoftwareList item, Machine machine, Source source) : this(item)
|
|
{
|
|
SetFieldValue<Source?>(SourceKey, source);
|
|
CopyMachineInformation(machine);
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
}
|