mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Help internal migration of models
This commit is contained in:
@@ -8,21 +8,131 @@ namespace SabreTools.Core
|
|||||||
{
|
{
|
||||||
public static class DictionaryBaseExtensions
|
public static class DictionaryBaseExtensions
|
||||||
{
|
{
|
||||||
|
#region Accessors
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the name to use for a DictionaryBase or null
|
||||||
|
/// </summary>
|
||||||
|
public static string? GetName(this DictionaryBase self)
|
||||||
|
{
|
||||||
|
if (self == null)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
return self switch
|
||||||
|
{
|
||||||
|
Machine => self.ReadString(Machine.NameKey),
|
||||||
|
|
||||||
|
Adjuster => self.ReadString(Adjuster.NameKey),
|
||||||
|
Analog => null,
|
||||||
|
Archive => self.ReadString(Archive.NameKey),
|
||||||
|
BiosSet => self.ReadString(BiosSet.NameKey),
|
||||||
|
Chip => self.ReadString(Chip.NameKey),
|
||||||
|
Condition => null,
|
||||||
|
ConfLocation => self.ReadString(ConfLocation.NameKey),
|
||||||
|
ConfSetting => self.ReadString(ConfSetting.NameKey),
|
||||||
|
Configuration => self.ReadString(Configuration.NameKey),
|
||||||
|
Control => null,
|
||||||
|
DataArea => self.ReadString(DataArea.NameKey),
|
||||||
|
Device => null,
|
||||||
|
DeviceRef => self.ReadString(DeviceRef.NameKey),
|
||||||
|
DipLocation => self.ReadString(DipLocation.NameKey),
|
||||||
|
DipSwitch => self.ReadString(DipSwitch.NameKey),
|
||||||
|
DipValue => self.ReadString(DipValue.NameKey),
|
||||||
|
Disk => self.ReadString(Disk.NameKey),
|
||||||
|
DiskArea => self.ReadString(DiskArea.NameKey),
|
||||||
|
Display => null,
|
||||||
|
Driver => null,
|
||||||
|
Extension => self.ReadString(Extension.NameKey),
|
||||||
|
Feature => self.ReadString(Feature.NameKey),
|
||||||
|
Info => self.ReadString(Info.NameKey),
|
||||||
|
Input => null,
|
||||||
|
Instance => self.ReadString(Instance.NameKey),
|
||||||
|
Media => self.ReadString(Media.NameKey),
|
||||||
|
Part => self.ReadString(Part.NameKey),
|
||||||
|
Port => null,
|
||||||
|
RamOption => self.ReadString(RamOption.NameKey),
|
||||||
|
Release => self.ReadString(Release.NameKey),
|
||||||
|
Rom => self.ReadString(Rom.NameKey),
|
||||||
|
Sample => self.ReadString(Sample.NameKey),
|
||||||
|
SharedFeat => self.ReadString(SharedFeat.NameKey),
|
||||||
|
Slot => self.ReadString(Slot.NameKey),
|
||||||
|
SlotOption => self.ReadString(SlotOption.NameKey),
|
||||||
|
SoftwareList => self.ReadString(SoftwareList.NameKey),
|
||||||
|
Sound => null,
|
||||||
|
|
||||||
|
_ => null,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the name to use for a DictionaryBase or null
|
||||||
|
/// </summary>
|
||||||
|
public static void SetName(this DictionaryBase self, string? name)
|
||||||
|
{
|
||||||
|
if (self == null || string.IsNullOrEmpty(name))
|
||||||
|
return;
|
||||||
|
|
||||||
|
switch (self)
|
||||||
|
{
|
||||||
|
case Machine: self[Machine.NameKey] = name; break;
|
||||||
|
|
||||||
|
case Adjuster: self[Adjuster.NameKey] = name; break;
|
||||||
|
case Analog: break;
|
||||||
|
case Archive: self[Archive.NameKey] = name; break;
|
||||||
|
case BiosSet: self[BiosSet.NameKey] = name; break;
|
||||||
|
case Chip: self[Chip.NameKey] = name; break;
|
||||||
|
case Condition: break;
|
||||||
|
case ConfLocation: self[ConfLocation.NameKey] = name; break;
|
||||||
|
case ConfSetting: self[ConfSetting.NameKey] = name; break;
|
||||||
|
case Configuration: self[Configuration.NameKey] = name; break;
|
||||||
|
case Control: break;
|
||||||
|
case DataArea: self[DataArea.NameKey] = name; break;
|
||||||
|
case Device: break;
|
||||||
|
case DeviceRef: self[DeviceRef.NameKey] = name; break;
|
||||||
|
case DipLocation: self[DipLocation.NameKey] = name; break;
|
||||||
|
case DipSwitch: self[DipSwitch.NameKey] = name; break;
|
||||||
|
case DipValue: self[DipValue.NameKey] = name; break;
|
||||||
|
case Disk: self[Disk.NameKey] = name; break;
|
||||||
|
case DiskArea: self[DiskArea.NameKey] = name; break;
|
||||||
|
case Display: break;
|
||||||
|
case Driver: break;
|
||||||
|
case Extension: self[Extension.NameKey] = name; break;
|
||||||
|
case Feature: self[Feature.NameKey] = name; break;
|
||||||
|
case Info: self[Info.NameKey] = name; break;
|
||||||
|
case Input: break;
|
||||||
|
case Instance: self[Instance.NameKey] = name; break;
|
||||||
|
case Media: self[Media.NameKey] = name; break;
|
||||||
|
case Part: self[Part.NameKey] = name; break;
|
||||||
|
case Port: break;
|
||||||
|
case RamOption: self[RamOption.NameKey] = name; break;
|
||||||
|
case Release: self[Release.NameKey] = name; break;
|
||||||
|
case Rom: self[Rom.NameKey] = name; break;
|
||||||
|
case Sample: self[Sample.NameKey] = name; break;
|
||||||
|
case SharedFeat: self[SharedFeat.NameKey] = name; break;
|
||||||
|
case Slot: self[Slot.NameKey] = name; break;
|
||||||
|
case SlotOption: self[SlotOption.NameKey] = name; break;
|
||||||
|
case SoftwareList: self[SoftwareList.NameKey] = name; break;
|
||||||
|
case Sound: break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region Cloning
|
#region Cloning
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Deep clone a DictionaryBase object
|
/// Deep clone a DictionaryBase object
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static DictionaryBase? Clone(this DictionaryBase dictionaryBase)
|
public static DictionaryBase? Clone(this DictionaryBase self)
|
||||||
{
|
{
|
||||||
// If construction failed, we can't do anything
|
// If construction failed, we can't do anything
|
||||||
if (Activator.CreateInstance(dictionaryBase.GetType()) is not DictionaryBase clone)
|
if (Activator.CreateInstance(self.GetType()) is not DictionaryBase clone)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
// Loop through and clone per type
|
// Loop through and clone per type
|
||||||
foreach (string key in dictionaryBase.Keys)
|
foreach (string key in self.Keys)
|
||||||
{
|
{
|
||||||
object? value = dictionaryBase[key];
|
object? value = self[key];
|
||||||
clone[key] = value switch
|
clone[key] = value switch
|
||||||
{
|
{
|
||||||
// Primative types
|
// Primative types
|
||||||
|
|||||||
@@ -520,15 +520,6 @@ namespace SabreTools.DatItems
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public abstract class DatItem<T> : DatItem, IEquatable<DatItem<T>>, IComparable<DatItem<T>>, ICloneable where T : Models.Metadata.DatItem
|
public abstract class DatItem<T> : DatItem, IEquatable<DatItem<T>>, IComparable<DatItem<T>>, ICloneable where T : Models.Metadata.DatItem
|
||||||
{
|
{
|
||||||
#region Fields
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Key for accessing the item name, if it exists
|
|
||||||
/// </summary>
|
|
||||||
protected abstract string? NameKey { get; }
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Constructors
|
#region Constructors
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -559,20 +550,10 @@ namespace SabreTools.DatItems
|
|||||||
#region Accessors
|
#region Accessors
|
||||||
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public override string? GetName()
|
public override string? GetName() => _internal.GetName();
|
||||||
{
|
|
||||||
if (!string.IsNullOrEmpty(NameKey))
|
|
||||||
return GetStringFieldValue(NameKey);
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public override void SetName(string? name)
|
public override void SetName(string? name) => _internal.SetName(name);
|
||||||
{
|
|
||||||
if (!string.IsNullOrEmpty(NameKey))
|
|
||||||
SetFieldValue(NameKey, name);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|||||||
@@ -15,9 +15,6 @@ namespace SabreTools.DatItems.Formats
|
|||||||
/// <inheritdoc>/>
|
/// <inheritdoc>/>
|
||||||
protected override ItemType ItemType => ItemType.Adjuster;
|
protected override ItemType ItemType => ItemType.Adjuster;
|
||||||
|
|
||||||
/// <inheritdoc>/>
|
|
||||||
protected override string? NameKey => Models.Metadata.Adjuster.NameKey;
|
|
||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public bool ConditionsSpecified
|
public bool ConditionsSpecified
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -14,9 +14,6 @@ namespace SabreTools.DatItems.Formats
|
|||||||
/// <inheritdoc>/>
|
/// <inheritdoc>/>
|
||||||
protected override ItemType ItemType => ItemType.Analog;
|
protected override ItemType ItemType => ItemType.Analog;
|
||||||
|
|
||||||
/// <inheritdoc>/>
|
|
||||||
protected override string? NameKey => null;
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Constructors
|
#region Constructors
|
||||||
|
|||||||
@@ -14,9 +14,6 @@ namespace SabreTools.DatItems.Formats
|
|||||||
/// <inheritdoc>/>
|
/// <inheritdoc>/>
|
||||||
protected override ItemType ItemType => ItemType.Archive;
|
protected override ItemType ItemType => ItemType.Archive;
|
||||||
|
|
||||||
/// <inheritdoc>/>
|
|
||||||
protected override string? NameKey => Models.Metadata.Archive.NameKey;
|
|
||||||
|
|
||||||
// TODO: None of the following are used or checked
|
// TODO: None of the following are used or checked
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -15,9 +15,6 @@ namespace SabreTools.DatItems.Formats
|
|||||||
/// <inheritdoc>/>
|
/// <inheritdoc>/>
|
||||||
protected override ItemType ItemType => ItemType.BiosSet;
|
protected override ItemType ItemType => ItemType.BiosSet;
|
||||||
|
|
||||||
/// <inheritdoc>/>
|
|
||||||
protected override string? NameKey => Models.Metadata.BiosSet.NameKey;
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Constructors
|
#region Constructors
|
||||||
|
|||||||
@@ -15,9 +15,6 @@ namespace SabreTools.DatItems.Formats
|
|||||||
/// <inheritdoc>/>
|
/// <inheritdoc>/>
|
||||||
protected override ItemType ItemType => ItemType.Chip;
|
protected override ItemType ItemType => ItemType.Chip;
|
||||||
|
|
||||||
/// <inheritdoc>/>
|
|
||||||
protected override string? NameKey => Models.Metadata.Chip.NameKey;
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Constructors
|
#region Constructors
|
||||||
|
|||||||
@@ -15,9 +15,6 @@ namespace SabreTools.DatItems.Formats
|
|||||||
/// <inheritdoc>/>
|
/// <inheritdoc>/>
|
||||||
protected override ItemType ItemType => ItemType.Condition;
|
protected override ItemType ItemType => ItemType.Condition;
|
||||||
|
|
||||||
/// <inheritdoc>/>
|
|
||||||
protected override string? NameKey => null;
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Constructors
|
#region Constructors
|
||||||
|
|||||||
@@ -15,9 +15,6 @@ namespace SabreTools.DatItems.Formats
|
|||||||
/// <inheritdoc>/>
|
/// <inheritdoc>/>
|
||||||
protected override ItemType ItemType => ItemType.ConfLocation;
|
protected override ItemType ItemType => ItemType.ConfLocation;
|
||||||
|
|
||||||
/// <inheritdoc>/>
|
|
||||||
protected override string? NameKey => Models.Metadata.ConfLocation.NameKey;
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Constructors
|
#region Constructors
|
||||||
|
|||||||
@@ -15,9 +15,6 @@ namespace SabreTools.DatItems.Formats
|
|||||||
/// <inheritdoc>/>
|
/// <inheritdoc>/>
|
||||||
protected override ItemType ItemType => ItemType.ConfSetting;
|
protected override ItemType ItemType => ItemType.ConfSetting;
|
||||||
|
|
||||||
/// <inheritdoc>/>
|
|
||||||
protected override string? NameKey => Models.Metadata.ConfSetting.NameKey;
|
|
||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public bool ConditionsSpecified
|
public bool ConditionsSpecified
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -16,9 +16,6 @@ namespace SabreTools.DatItems.Formats
|
|||||||
/// <inheritdoc>/>
|
/// <inheritdoc>/>
|
||||||
protected override ItemType ItemType => ItemType.Configuration;
|
protected override ItemType ItemType => ItemType.Configuration;
|
||||||
|
|
||||||
/// <inheritdoc>/>
|
|
||||||
protected override string? NameKey => Models.Metadata.Configuration.NameKey;
|
|
||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public bool ConditionsSpecified
|
public bool ConditionsSpecified
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -15,9 +15,6 @@ namespace SabreTools.DatItems.Formats
|
|||||||
/// <inheritdoc>/>
|
/// <inheritdoc>/>
|
||||||
protected override ItemType ItemType => ItemType.Control;
|
protected override ItemType ItemType => ItemType.Control;
|
||||||
|
|
||||||
/// <inheritdoc>/>
|
|
||||||
protected override string? NameKey => null;
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Constructors
|
#region Constructors
|
||||||
|
|||||||
@@ -16,9 +16,6 @@ namespace SabreTools.DatItems.Formats
|
|||||||
/// <inheritdoc>/>
|
/// <inheritdoc>/>
|
||||||
protected override ItemType ItemType => ItemType.DataArea;
|
protected override ItemType ItemType => ItemType.DataArea;
|
||||||
|
|
||||||
/// <inheritdoc>/>
|
|
||||||
protected override string? NameKey => Models.Metadata.DataArea.NameKey;
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Constructors
|
#region Constructors
|
||||||
|
|||||||
@@ -17,9 +17,6 @@ namespace SabreTools.DatItems.Formats
|
|||||||
/// <inheritdoc>/>
|
/// <inheritdoc>/>
|
||||||
protected override ItemType ItemType => ItemType.Device;
|
protected override ItemType ItemType => ItemType.Device;
|
||||||
|
|
||||||
/// <inheritdoc>/>
|
|
||||||
protected override string? NameKey => null;
|
|
||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public bool InstancesSpecified
|
public bool InstancesSpecified
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -14,9 +14,6 @@ namespace SabreTools.DatItems.Formats
|
|||||||
/// <inheritdoc>/>
|
/// <inheritdoc>/>
|
||||||
protected override ItemType ItemType => ItemType.DeviceRef;
|
protected override ItemType ItemType => ItemType.DeviceRef;
|
||||||
|
|
||||||
/// <inheritdoc>/>
|
|
||||||
protected override string? NameKey => Models.Metadata.DeviceRef.NameKey;
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Constructors
|
#region Constructors
|
||||||
|
|||||||
@@ -15,9 +15,6 @@ namespace SabreTools.DatItems.Formats
|
|||||||
/// <inheritdoc>/>
|
/// <inheritdoc>/>
|
||||||
protected override ItemType ItemType => ItemType.DipLocation;
|
protected override ItemType ItemType => ItemType.DipLocation;
|
||||||
|
|
||||||
/// <inheritdoc>/>
|
|
||||||
protected override string? NameKey => Models.Metadata.DipLocation.NameKey;
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Constructors
|
#region Constructors
|
||||||
|
|||||||
@@ -26,9 +26,6 @@ namespace SabreTools.DatItems.Formats
|
|||||||
/// <inheritdoc>/>
|
/// <inheritdoc>/>
|
||||||
protected override ItemType ItemType => ItemType.DipSwitch;
|
protected override ItemType ItemType => ItemType.DipSwitch;
|
||||||
|
|
||||||
/// <inheritdoc>/>
|
|
||||||
protected override string? NameKey => Models.Metadata.DipSwitch.NameKey;
|
|
||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public bool ConditionsSpecified
|
public bool ConditionsSpecified
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -15,9 +15,6 @@ namespace SabreTools.DatItems.Formats
|
|||||||
/// <inheritdoc>/>
|
/// <inheritdoc>/>
|
||||||
protected override ItemType ItemType => ItemType.DipValue;
|
protected override ItemType ItemType => ItemType.DipValue;
|
||||||
|
|
||||||
/// <inheritdoc>/>
|
|
||||||
protected override string? NameKey => Models.Metadata.DipValue.NameKey;
|
|
||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public bool ConditionsSpecified
|
public bool ConditionsSpecified
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -30,9 +30,6 @@ namespace SabreTools.DatItems.Formats
|
|||||||
/// <inheritdoc>/>
|
/// <inheritdoc>/>
|
||||||
protected override ItemType ItemType => ItemType.Disk;
|
protected override ItemType ItemType => ItemType.Disk;
|
||||||
|
|
||||||
/// <inheritdoc>/>
|
|
||||||
protected override string? NameKey => Models.Metadata.Disk.NameKey;
|
|
||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public bool DiskAreaSpecified
|
public bool DiskAreaSpecified
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -15,9 +15,6 @@ namespace SabreTools.DatItems.Formats
|
|||||||
/// <inheritdoc>/>
|
/// <inheritdoc>/>
|
||||||
protected override ItemType ItemType => ItemType.DiskArea;
|
protected override ItemType ItemType => ItemType.DiskArea;
|
||||||
|
|
||||||
/// <inheritdoc>/>
|
|
||||||
protected override string? NameKey => Models.Metadata.DiskArea.NameKey;
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Constructors
|
#region Constructors
|
||||||
|
|||||||
@@ -15,9 +15,6 @@ namespace SabreTools.DatItems.Formats
|
|||||||
/// <inheritdoc>/>
|
/// <inheritdoc>/>
|
||||||
protected override ItemType ItemType => ItemType.Display;
|
protected override ItemType ItemType => ItemType.Display;
|
||||||
|
|
||||||
/// <inheritdoc>/>
|
|
||||||
protected override string? NameKey => null;
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Constructors
|
#region Constructors
|
||||||
|
|||||||
@@ -15,9 +15,6 @@ namespace SabreTools.DatItems.Formats
|
|||||||
/// <inheritdoc>/>
|
/// <inheritdoc>/>
|
||||||
protected override ItemType ItemType => ItemType.Driver;
|
protected override ItemType ItemType => ItemType.Driver;
|
||||||
|
|
||||||
/// <inheritdoc>/>
|
|
||||||
protected override string? NameKey => null;
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Constructors
|
#region Constructors
|
||||||
|
|||||||
@@ -14,9 +14,6 @@ namespace SabreTools.DatItems.Formats
|
|||||||
/// <inheritdoc>/>
|
/// <inheritdoc>/>
|
||||||
protected override ItemType ItemType => ItemType.Extension;
|
protected override ItemType ItemType => ItemType.Extension;
|
||||||
|
|
||||||
/// <inheritdoc>/>
|
|
||||||
protected override string? NameKey => Models.Metadata.Extension.NameKey;
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Constructors
|
#region Constructors
|
||||||
|
|||||||
@@ -15,9 +15,6 @@ namespace SabreTools.DatItems.Formats
|
|||||||
/// <inheritdoc>/>
|
/// <inheritdoc>/>
|
||||||
protected override ItemType ItemType => ItemType.Feature;
|
protected override ItemType ItemType => ItemType.Feature;
|
||||||
|
|
||||||
/// <inheritdoc>/>
|
|
||||||
protected override string? NameKey => null;
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Constructors
|
#region Constructors
|
||||||
|
|||||||
@@ -14,9 +14,6 @@ namespace SabreTools.DatItems.Formats
|
|||||||
/// <inheritdoc>/>
|
/// <inheritdoc>/>
|
||||||
protected override ItemType ItemType => ItemType.Info;
|
protected override ItemType ItemType => ItemType.Info;
|
||||||
|
|
||||||
/// <inheritdoc>/>
|
|
||||||
protected override string? NameKey => Models.Metadata.Instance.NameKey;
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Constructors
|
#region Constructors
|
||||||
|
|||||||
@@ -17,9 +17,6 @@ namespace SabreTools.DatItems.Formats
|
|||||||
/// <inheritdoc>/>
|
/// <inheritdoc>/>
|
||||||
protected override ItemType ItemType => ItemType.Input;
|
protected override ItemType ItemType => ItemType.Input;
|
||||||
|
|
||||||
/// <inheritdoc>/>
|
|
||||||
protected override string? NameKey => null;
|
|
||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public bool ControlsSpecified
|
public bool ControlsSpecified
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -14,9 +14,6 @@ namespace SabreTools.DatItems.Formats
|
|||||||
/// <inheritdoc>/>
|
/// <inheritdoc>/>
|
||||||
protected override ItemType ItemType => ItemType.Instance;
|
protected override ItemType ItemType => ItemType.Instance;
|
||||||
|
|
||||||
/// <inheritdoc>/>
|
|
||||||
protected override string? NameKey => Models.Metadata.Instance.NameKey;
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Constructors
|
#region Constructors
|
||||||
|
|||||||
@@ -16,9 +16,6 @@ namespace SabreTools.DatItems.Formats
|
|||||||
/// <inheritdoc>/>
|
/// <inheritdoc>/>
|
||||||
protected override ItemType ItemType => ItemType.Media;
|
protected override ItemType ItemType => ItemType.Media;
|
||||||
|
|
||||||
/// <inheritdoc>/>
|
|
||||||
protected override string? NameKey => Models.Metadata.Media.NameKey;
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Constructors
|
#region Constructors
|
||||||
|
|||||||
@@ -15,9 +15,6 @@ namespace SabreTools.DatItems.Formats
|
|||||||
/// <inheritdoc>/>
|
/// <inheritdoc>/>
|
||||||
protected override ItemType ItemType => ItemType.Part;
|
protected override ItemType ItemType => ItemType.Part;
|
||||||
|
|
||||||
/// <inheritdoc>/>
|
|
||||||
protected override string? NameKey => Models.Metadata.Part.NameKey;
|
|
||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public bool FeaturesSpecified
|
public bool FeaturesSpecified
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -24,9 +24,6 @@ namespace SabreTools.DatItems.Formats
|
|||||||
/// <inheritdoc>/>
|
/// <inheritdoc>/>
|
||||||
protected override ItemType ItemType => ItemType.PartFeature;
|
protected override ItemType ItemType => ItemType.PartFeature;
|
||||||
|
|
||||||
/// <inheritdoc>/>
|
|
||||||
protected override string? NameKey => Models.Metadata.Feature.NameKey;
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Constructors
|
#region Constructors
|
||||||
|
|||||||
@@ -16,9 +16,6 @@ namespace SabreTools.DatItems.Formats
|
|||||||
/// <inheritdoc>/>
|
/// <inheritdoc>/>
|
||||||
protected override ItemType ItemType => ItemType.Port;
|
protected override ItemType ItemType => ItemType.Port;
|
||||||
|
|
||||||
/// <inheritdoc>/>
|
|
||||||
protected override string? NameKey => null;
|
|
||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public bool AnalogsSpecified
|
public bool AnalogsSpecified
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -15,9 +15,6 @@ namespace SabreTools.DatItems.Formats
|
|||||||
/// <inheritdoc>/>
|
/// <inheritdoc>/>
|
||||||
protected override ItemType ItemType => ItemType.RamOption;
|
protected override ItemType ItemType => ItemType.RamOption;
|
||||||
|
|
||||||
/// <inheritdoc>/>
|
|
||||||
protected override string? NameKey => Models.Metadata.RamOption.NameKey;
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Constructors
|
#region Constructors
|
||||||
|
|||||||
@@ -15,9 +15,6 @@ namespace SabreTools.DatItems.Formats
|
|||||||
/// <inheritdoc>/>
|
/// <inheritdoc>/>
|
||||||
protected override ItemType ItemType => ItemType.Release;
|
protected override ItemType ItemType => ItemType.Release;
|
||||||
|
|
||||||
/// <inheritdoc>/>
|
|
||||||
protected override string? NameKey => Models.Metadata.Release.NameKey;
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Constructors
|
#region Constructors
|
||||||
|
|||||||
@@ -30,9 +30,6 @@ namespace SabreTools.DatItems.Formats
|
|||||||
/// <inheritdoc>/>
|
/// <inheritdoc>/>
|
||||||
protected override ItemType ItemType => ItemType.Rom;
|
protected override ItemType ItemType => ItemType.Rom;
|
||||||
|
|
||||||
/// <inheritdoc>/>
|
|
||||||
protected override string? NameKey => Models.Metadata.Rom.NameKey;
|
|
||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public bool ItemStatusSpecified
|
public bool ItemStatusSpecified
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -14,9 +14,6 @@ namespace SabreTools.DatItems.Formats
|
|||||||
/// <inheritdoc>/>
|
/// <inheritdoc>/>
|
||||||
protected override ItemType ItemType => ItemType.Sample;
|
protected override ItemType ItemType => ItemType.Sample;
|
||||||
|
|
||||||
/// <inheritdoc>/>
|
|
||||||
protected override string? NameKey => Models.Metadata.Sample.NameKey;
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Constructors
|
#region Constructors
|
||||||
|
|||||||
@@ -14,9 +14,6 @@ namespace SabreTools.DatItems.Formats
|
|||||||
/// <inheritdoc>/>
|
/// <inheritdoc>/>
|
||||||
protected override ItemType ItemType => ItemType.SharedFeat;
|
protected override ItemType ItemType => ItemType.SharedFeat;
|
||||||
|
|
||||||
/// <inheritdoc>/>
|
|
||||||
protected override string? NameKey => Models.Metadata.SharedFeat.NameKey;
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Constructors
|
#region Constructors
|
||||||
|
|||||||
@@ -16,9 +16,6 @@ namespace SabreTools.DatItems.Formats
|
|||||||
/// <inheritdoc>/>
|
/// <inheritdoc>/>
|
||||||
protected override ItemType ItemType => ItemType.Slot;
|
protected override ItemType ItemType => ItemType.Slot;
|
||||||
|
|
||||||
/// <inheritdoc>/>
|
|
||||||
protected override string? NameKey => Models.Metadata.Slot.NameKey;
|
|
||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public bool SlotOptionsSpecified
|
public bool SlotOptionsSpecified
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -15,9 +15,6 @@ namespace SabreTools.DatItems.Formats
|
|||||||
/// <inheritdoc>/>
|
/// <inheritdoc>/>
|
||||||
protected override ItemType ItemType => ItemType.SlotOption;
|
protected override ItemType ItemType => ItemType.SlotOption;
|
||||||
|
|
||||||
/// <inheritdoc>/>
|
|
||||||
protected override string? NameKey => Models.Metadata.SlotOption.NameKey;
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Constructors
|
#region Constructors
|
||||||
|
|||||||
@@ -15,9 +15,6 @@ namespace SabreTools.DatItems.Formats
|
|||||||
/// <inheritdoc>/>
|
/// <inheritdoc>/>
|
||||||
protected override ItemType ItemType => ItemType.SoftwareList;
|
protected override ItemType ItemType => ItemType.SoftwareList;
|
||||||
|
|
||||||
/// <inheritdoc>/>
|
|
||||||
protected override string? NameKey => Models.Metadata.SoftwareList.NameKey;
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Constructors
|
#region Constructors
|
||||||
|
|||||||
@@ -14,9 +14,6 @@ namespace SabreTools.DatItems.Formats
|
|||||||
/// <inheritdoc>/>
|
/// <inheritdoc>/>
|
||||||
protected override ItemType ItemType => ItemType.Sound;
|
protected override ItemType ItemType => ItemType.Sound;
|
||||||
|
|
||||||
/// <inheritdoc>/>
|
|
||||||
protected override string? NameKey => null;
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Constructors
|
#region Constructors
|
||||||
|
|||||||
Reference in New Issue
Block a user