mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Fix build... (understatement)
This commit is contained in:
@@ -9,6 +9,27 @@ namespace SabreTools.Filtering
|
||||
/// </summary>
|
||||
public class Cleaner
|
||||
{
|
||||
#region Filter Fields
|
||||
|
||||
/// <summary>
|
||||
/// Filter for DatHeader fields
|
||||
/// </summary>
|
||||
public DatHeaderFilter DatHeaderFilter { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Filter for DatItem fields
|
||||
/// </summary>
|
||||
public DatItemFilter DatItemFilter { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Filter for Machine fields
|
||||
/// </summary>
|
||||
public MachineFilter MachineFilter { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Flag Fields
|
||||
|
||||
/// <summary>
|
||||
/// Clean all names to WoD standards
|
||||
/// </summary>
|
||||
@@ -25,9 +46,19 @@ namespace SabreTools.Filtering
|
||||
public bool DescriptionAsName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Dictionary of fields in machine and items to exclude from writing
|
||||
/// Dictionary of DatHeader fields to exclude from writing
|
||||
/// </summary>
|
||||
public List<Field> ExcludeFields { get; set; } = new List<Field>();
|
||||
public List<DatHeaderField> ExcludeDatHeaderFields { get; set; } = new List<DatHeaderField>();
|
||||
|
||||
/// <summary>
|
||||
/// Dictionary of DatItem fields to exclude from writing
|
||||
/// </summary>
|
||||
public List<DatItemField> ExcludeDatItemFields { get; set; } = new List<DatItemField>();
|
||||
|
||||
/// <summary>
|
||||
/// Dictionary of Machine fields to exclude from writing
|
||||
/// </summary>
|
||||
public List<MachineField> ExcludeMachineFields { get; set; } = new List<MachineField>();
|
||||
|
||||
/// <summary>
|
||||
/// Keep machines that don't contain any items
|
||||
@@ -73,5 +104,7 @@ namespace SabreTools.Filtering
|
||||
/// Trim total machine and item name to not exceed NTFS limits
|
||||
/// </summary>
|
||||
public bool Trim { get; set; }
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,7 +60,8 @@ namespace SabreTools.Filtering
|
||||
string fieldString = inputTrimmed.Split(':')[0].ToLowerInvariant().Trim('"', ' ', '\t');
|
||||
string fileString = inputTrimmed.Substring(fieldString.Length + 1).Trim('"', ' ', '\t');
|
||||
|
||||
item.Field = fieldString.AsField();
|
||||
item.DatItemField = fieldString.AsDatItemField();
|
||||
item.MachineField = fieldString.AsMachineField();
|
||||
if (item.PopulateFromFile(fileString))
|
||||
Items.Add(item);
|
||||
}
|
||||
|
||||
@@ -12,9 +12,14 @@ namespace SabreTools.Filtering
|
||||
#region Fields
|
||||
|
||||
/// <summary>
|
||||
/// Field to update with INI information
|
||||
/// MachineField to update with INI information
|
||||
/// </summary>
|
||||
public Field Field { get; set; }
|
||||
public MachineField MachineField { get; set; } = MachineField.NULL;
|
||||
|
||||
/// <summary>
|
||||
/// DatItemField to update with INI information
|
||||
/// </summary>
|
||||
public DatItemField DatItemField { get; set; } = DatItemField.NULL;
|
||||
|
||||
/// <summary>
|
||||
/// Mappings from value to machine name
|
||||
|
||||
@@ -219,7 +219,7 @@ namespace SabreTools.Filtering
|
||||
/// <param name="filterItem">Filter item to check</param>
|
||||
/// <param name="value">Value to check</param>
|
||||
/// <returns>True if the value passes, false otherwise</returns>
|
||||
public bool PassBoolFilter(FilterItem<bool?> filterItem, bool? value)
|
||||
public static bool PassBoolFilter(FilterItem<bool?> filterItem, bool? value)
|
||||
{
|
||||
if (filterItem.MatchesNeutral(null, value) == false)
|
||||
return false;
|
||||
@@ -233,7 +233,7 @@ namespace SabreTools.Filtering
|
||||
/// <param name="filterItem">Filter item to check</param>
|
||||
/// <param name="value">Value to check</param>
|
||||
/// <returns>True if the value passes, false otherwise</returns>
|
||||
public bool PassDoubleFilter(FilterItem<double?> filterItem, double? value)
|
||||
public static bool PassDoubleFilter(FilterItem<double?> filterItem, double? value)
|
||||
{
|
||||
if (filterItem.MatchesNeutral(null, value) == false)
|
||||
return false;
|
||||
@@ -251,7 +251,7 @@ namespace SabreTools.Filtering
|
||||
/// <param name="filterItem">Filter item to check</param>
|
||||
/// <param name="value">Value to check</param>
|
||||
/// <returns>True if the value passes, false otherwise</returns>
|
||||
public bool PassLongFilter(FilterItem<long?> filterItem, long? value)
|
||||
public static bool PassLongFilter(FilterItem<long?> filterItem, long? value)
|
||||
{
|
||||
if (filterItem.MatchesNeutral(null, value) == false)
|
||||
return false;
|
||||
@@ -269,7 +269,7 @@ namespace SabreTools.Filtering
|
||||
/// <param name="filterItem">Filter item to check</param>
|
||||
/// <param name="value">Value to check</param>
|
||||
/// <returns>True if the value passes, false otherwise</returns>
|
||||
public bool PassStringFilter(FilterItem<string> filterItem, string value)
|
||||
public static bool PassStringFilter(FilterItem<string> filterItem, string value)
|
||||
{
|
||||
if (filterItem.MatchesPositiveSet(value) == false)
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user