mirror of
https://github.com/SabreTools/SabreTools.Serialization.git
synced 2026-04-19 12:43:17 +00:00
61 lines
1.7 KiB
C#
61 lines
1.7 KiB
C#
using System.Xml.Serialization;
|
|
using Newtonsoft.Json;
|
|
using SabreTools.Data.Extensions;
|
|
|
|
namespace SabreTools.Metadata.DatItems.Formats
|
|
{
|
|
/// <summary>
|
|
/// Represents which BIOS(es) is associated with a set
|
|
/// </summary>
|
|
[JsonObject("biosset"), XmlRoot("biosset")]
|
|
public sealed class BiosSet : DatItem<Data.Models.Metadata.BiosSet>
|
|
{
|
|
#region Properties
|
|
|
|
public bool? Default
|
|
{
|
|
get => (_internal as Data.Models.Metadata.BiosSet)?.Default;
|
|
set => (_internal as Data.Models.Metadata.BiosSet)?.Default = value;
|
|
}
|
|
|
|
public string? Description
|
|
{
|
|
get => (_internal as Data.Models.Metadata.BiosSet)?.Description;
|
|
set => (_internal as Data.Models.Metadata.BiosSet)?.Description = value;
|
|
}
|
|
|
|
/// <inheritdoc>/>
|
|
public override Data.Models.Metadata.ItemType ItemType
|
|
=> Data.Models.Metadata.ItemType.BiosSet;
|
|
|
|
public string? Name
|
|
{
|
|
get => (_internal as Data.Models.Metadata.BiosSet)?.Name;
|
|
set => (_internal as Data.Models.Metadata.BiosSet)?.Name = value;
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Constructors
|
|
|
|
public BiosSet() : base() { }
|
|
|
|
public BiosSet(Data.Models.Metadata.BiosSet item) : base(item) { }
|
|
|
|
public BiosSet(Data.Models.Metadata.BiosSet item, Machine machine, Source source) : this(item)
|
|
{
|
|
Source = source;
|
|
CopyMachineInformation(machine);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Cloning Methods
|
|
|
|
/// <inheritdoc/>
|
|
public override object Clone() => new BiosSet(_internal.DeepClone() as Data.Models.Metadata.BiosSet ?? []);
|
|
|
|
#endregion
|
|
}
|
|
}
|