Part is only part of DipSwitch, Disk, and Rom

This commit is contained in:
Matt Nadareski
2020-09-03 11:19:06 -07:00
parent d727385fb8
commit 47c2c1d227
35 changed files with 265 additions and 95 deletions

View File

@@ -104,12 +104,6 @@ namespace SabreTools.Library.DatItems
#region SoftwareList Fields
/// <summary>
/// Original hardware part associated with the item
/// </summary>
[JsonProperty("part", DefaultValueHandling = DefaultValueHandling.Ignore)]
public Part Part { get; set; }
/// <summary>
/// SoftwareList value associated with the item
/// </summary>
@@ -769,18 +763,6 @@ namespace SabreTools.Library.DatItems
#region SoftwareList
// Filter on part name
if (filter.DatItem_Part_Name.MatchesPositiveSet(Part?.Name) == false)
return false;
if (filter.DatItem_Part_Name.MatchesNegativeSet(Part?.Name) == true)
return false;
// Filter on part interface
if (filter.DatItem_Part_Interface.MatchesPositiveSet(Part?.Interface) == false)
return false;
if (filter.DatItem_Part_Interface.MatchesNegativeSet(Part?.Interface) == true)
return false;
// Filter on softwarelist value
if (filter.DatItem_Value.MatchesPositiveSet(Value) == false)
return false;
@@ -838,15 +820,6 @@ namespace SabreTools.Library.DatItems
#region SoftwareList
if (fields.Contains(Field.DatItem_Part_Name) && Part != null)
Part.Name = null;
if (fields.Contains(Field.DatItem_Part_Interface) && Part != null)
Part.Interface = null;
if (fields.Contains(Field.DatItem_Features) && Part != null)
Part.Features = null;
if (fields.Contains(Field.DatItem_Value))
Value = null;
@@ -974,30 +947,6 @@ namespace SabreTools.Library.DatItems
#region SoftwareList
if (fields.Contains(Field.DatItem_Part_Name))
{
if (Part == null)
Part = new Part();
Part.Name = item.Part?.Name;
}
if (fields.Contains(Field.DatItem_Part_Interface))
{
if (Part == null)
Part = new Part();
Part.Interface = item.Part?.Interface;
}
if (fields.Contains(Field.DatItem_Features))
{
if (Part == null)
Part = new Part();
Part.Features = item.Part?.Features;
}
if (fields.Contains(Field.DatItem_Value))
Value = item.Value;