2026-03-24 18:03:01 -04:00
|
|
|
|
using System.Xml.Serialization;
|
|
|
|
|
|
using Newtonsoft.Json;
|
2026-03-27 00:48:44 -04:00
|
|
|
|
using SabreTools.Data.Extensions;
|
2026-03-24 18:03:01 -04:00
|
|
|
|
|
|
|
|
|
|
namespace SabreTools.Metadata.DatItems.Formats
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Represents a (usually WAV-formatted) sample to be included for use in the set
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[JsonObject("sample"), XmlRoot("sample")]
|
|
|
|
|
|
public class Sample : DatItem<Data.Models.Metadata.Sample>
|
|
|
|
|
|
{
|
|
|
|
|
|
#region Fields
|
|
|
|
|
|
|
|
|
|
|
|
/// <inheritdoc>/>
|
|
|
|
|
|
protected override ItemType ItemType => ItemType.Sample;
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region Constructors
|
|
|
|
|
|
|
|
|
|
|
|
public Sample() : base() { }
|
|
|
|
|
|
|
|
|
|
|
|
public Sample(Data.Models.Metadata.Sample item) : base(item) { }
|
|
|
|
|
|
|
|
|
|
|
|
public Sample(Data.Models.Metadata.Sample item, Machine machine, Source source) : this(item)
|
|
|
|
|
|
{
|
2026-03-26 13:52:00 -04:00
|
|
|
|
Write<Source?>(SourceKey, source);
|
2026-03-24 18:03:01 -04:00
|
|
|
|
CopyMachineInformation(machine);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
2026-03-26 23:46:20 -04:00
|
|
|
|
|
|
|
|
|
|
#region Cloning Methods
|
|
|
|
|
|
|
|
|
|
|
|
/// <inheritdoc/>
|
|
|
|
|
|
public override object Clone() => new Sample(_internal.Clone() as Data.Models.Metadata.Sample ?? []);
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
2026-03-24 18:03:01 -04:00
|
|
|
|
}
|
|
|
|
|
|
}
|