Files

45 lines
997 B
C#
Raw Permalink Normal View History

2026-04-02 15:49:06 -04:00
using System;
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
{
[JsonObject("sample"), XmlRoot("sample")]
2026-04-02 16:07:34 -04:00
public class Sample : DatItem, IEquatable<Sample>
2025-09-26 10:20:48 -04:00
{
2026-04-01 13:18:45 -04:00
#region Properties
public string? Name { get; set; }
#endregion
public Sample() => ItemType = ItemType.Sample;
2026-04-02 15:49:06 -04:00
/// <inheritdoc/>
public object Clone()
{
var obj = new Sample();
obj.Name = Name;
return obj;
}
2026-04-02 16:07:34 -04:00
/// <inheritdoc/>
public bool Equals(Sample? other)
{
// Null never matches
if (other is null)
return false;
// Properties
if ((Name is null) ^ (other.Name is null))
return false;
else if (Name is not null && !Name.Equals(other.Name, StringComparison.OrdinalIgnoreCase))
return false;
return true;
}
2025-09-26 10:20:48 -04:00
}
}