Reduce DatItem boilerplate

This commit is contained in:
Matt Nadareski
2020-09-08 10:56:37 -07:00
parent f0afe33dd7
commit d8835920a7
35 changed files with 202 additions and 426 deletions

View File

@@ -181,15 +181,11 @@ namespace SabreTools.Library.DatItems
return false;
// Filter on part name
if (filter.DatItem_Part_Name.MatchesPositiveSet(Name) == false)
return false;
if (filter.DatItem_Part_Name.MatchesNegativeSet(Name) == true)
if (!PassStringFilter(filter.DatItem_Part_Name, Name))
return false;
// Filter on part interface
if (filter.DatItem_Part_Interface.MatchesPositiveSet(Interface) == false)
return false;
if (filter.DatItem_Part_Interface.MatchesNegativeSet(Interface) == true)
if (!PassStringFilter(filter.DatItem_Part_Interface, Interface))
return false;
// Filter on features