mirror of
https://github.com/SabreTools/SabreTools.Serialization.git
synced 2026-04-05 22:01:33 +00:00
43 lines
1.1 KiB
C#
43 lines
1.1 KiB
C#
using System.Xml.Serialization;
|
|
using Newtonsoft.Json;
|
|
using SabreTools.Data.Extensions;
|
|
|
|
namespace SabreTools.Metadata.DatItems.Formats
|
|
{
|
|
/// <summary>
|
|
/// SoftwareList diskarea information
|
|
/// </summary>
|
|
/// <remarks>One DiskArea can contain multiple Disk items</remarks>
|
|
[JsonObject("diskarea"), XmlRoot("diskarea")]
|
|
public sealed class DiskArea : DatItem<Data.Models.Metadata.DiskArea>
|
|
{
|
|
#region Fields
|
|
|
|
/// <inheritdoc>/>
|
|
protected override ItemType ItemType => ItemType.DiskArea;
|
|
|
|
#endregion
|
|
|
|
#region Constructors
|
|
|
|
public DiskArea() : base() { }
|
|
|
|
public DiskArea(Data.Models.Metadata.DiskArea item) : base(item) { }
|
|
|
|
public DiskArea(Data.Models.Metadata.DiskArea item, Machine machine, Source source) : this(item)
|
|
{
|
|
Write<Source?>(SourceKey, source);
|
|
CopyMachineInformation(machine);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Cloning Methods
|
|
|
|
/// <inheritdoc/>
|
|
public override object Clone() => new DiskArea(_internal.Clone() as Data.Models.Metadata.DiskArea ?? []);
|
|
|
|
#endregion
|
|
}
|
|
}
|