Files
SabreTools.Serialization/SabreTools.Data.Models/Metadata/DatItem.cs

28 lines
721 B
C#
Raw Normal View History

2025-09-26 10:20:48 -04:00
using System.Xml.Serialization;
using Newtonsoft.Json;
2025-09-26 13:06:18 -04:00
namespace SabreTools.Data.Models.Metadata
2025-09-26 10:20:48 -04:00
{
/// <summary>
/// Format-agnostic representation of item data
/// </summary>
public class DatItem : DictionaryBase
{
#region Common Keys
public const string TypeKey = "_type";
#endregion
/// <summary>
/// Quick accessor to item type, if it exists
/// </summary>
[JsonProperty("itemtype", DefaultValueHandling = DefaultValueHandling.Ignore), XmlElement("itemtype")]
public ItemType? Type
{
get => ContainsKey(TypeKey) ? this[TypeKey] as ItemType? : null;
set => this[TypeKey] = value;
}
}
2026-01-27 12:03:01 -05:00
}