using System.Xml.Serialization;
using Newtonsoft.Json;
using SabreTools.Core;
namespace SabreTools.DatItems.Formats
{
///
/// Represents one machine display
///
[JsonObject("display"), XmlRoot("display")]
public class Display : DatItem
{
#region Constructors
///
/// Create a default, empty Display object
///
public Display()
{
_internal = new Models.Metadata.Display();
Machine = new Machine();
ItemType = ItemType.Display;
}
///
/// Create a Display object from the internal model
///
public Display(Models.Metadata.Display? item)
{
_internal = item ?? [];
Machine = new Machine();
ItemType = ItemType.Display;
}
#endregion
#region Cloning Methods
///
public override object Clone()
{
return new Display()
{
ItemType = this.ItemType,
DupeType = this.DupeType,
Machine = this.Machine.Clone() as Machine ?? new Machine(),
Source = this.Source?.Clone() as Source,
Remove = this.Remove,
_internal = this._internal?.Clone() as Models.Metadata.Display ?? [],
};
}
#endregion
}
}