Files
SabreTools/SabreTools.DatItems/Formats/Input.cs

40 lines
942 B
C#
Raw Normal View History

2024-03-09 21:34:26 -05:00
using System.Xml.Serialization;
2020-09-03 13:20:56 -07:00
using Newtonsoft.Json;
2020-09-02 21:59:26 -07:00
2021-02-02 10:23:43 -08:00
namespace SabreTools.DatItems.Formats
2020-09-02 21:59:26 -07:00
{
/// <summary>
/// Represents one ListXML input
/// </summary>
2020-09-08 10:12:41 -07:00
[JsonObject("input"), XmlRoot("input")]
2024-03-10 20:39:54 -04:00
public sealed class Input : DatItem<Models.Metadata.Input>
2020-09-02 21:59:26 -07:00
{
#region Fields
2024-03-10 20:39:54 -04:00
/// <inheritdoc>/>
protected override ItemType ItemType => ItemType.Input;
/// <inheritdoc>/>
protected override string? NameKey => null;
2020-09-07 22:00:02 -07:00
[JsonIgnore]
2024-03-09 21:34:26 -05:00
public bool ControlsSpecified
{
2024-03-09 21:34:26 -05:00
get
{
var controls = GetFieldValue<Control[]?>(Models.Metadata.Input.ControlKey);
return controls != null && controls.Length > 0;
}
}
2020-09-02 21:59:26 -07:00
#endregion
#region Constructors
2024-03-10 20:39:54 -04:00
public Input() : base() { }
public Input(Models.Metadata.Input item) : base(item) { }
2020-09-02 21:59:26 -07:00
#endregion
}
}