mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
42 lines
1.0 KiB
C#
42 lines
1.0 KiB
C#
using System.Xml.Serialization;
|
|
using Newtonsoft.Json;
|
|
|
|
namespace SabreTools.DatItems.Formats
|
|
{
|
|
/// <summary>
|
|
/// SoftwareList part information
|
|
/// </summary>
|
|
/// <remarks>One Part can contain multiple PartFeature, DataArea, DiskArea, and DipSwitch items</remarks>
|
|
[JsonObject("part"), XmlRoot("part")]
|
|
public sealed class Part : DatItem<Models.Metadata.Part>
|
|
{
|
|
#region Fields
|
|
|
|
/// <inheritdoc>/>
|
|
protected override ItemType ItemType => ItemType.Part;
|
|
|
|
/// <inheritdoc>/>
|
|
protected override string? NameKey => Models.Metadata.Part.NameKey;
|
|
|
|
[JsonIgnore]
|
|
public bool FeaturesSpecified
|
|
{
|
|
get
|
|
{
|
|
var features = GetFieldValue<PartFeature[]?>(Models.Metadata.Part.FeatureKey);
|
|
return features != null && features.Length > 0;
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Constructors
|
|
|
|
public Part() : base() { }
|
|
|
|
public Part(Models.Metadata.Part item) : base(item) { }
|
|
|
|
#endregion
|
|
}
|
|
}
|