mirror of
https://github.com/SabreTools/SabreTools.Serialization.git
synced 2026-10-01 11:12:19 +00:00
Port metadata functionality from ST
This commit is contained in:
33
SabreTools.Metadata.DatItems/Formats/Sample.cs
Normal file
33
SabreTools.Metadata.DatItems/Formats/Sample.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using System.Xml.Serialization;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
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)
|
||||
{
|
||||
SetFieldValue<Source?>(SourceKey, source);
|
||||
CopyMachineInformation(machine);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user