mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Sync implementation split
This commit is contained in:
@@ -845,13 +845,24 @@ namespace SabreTools.DatFiles
|
|||||||
foreach (var key in keys)
|
foreach (var key in keys)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
List<DatItem>? items = this[key];
|
ExecuteFilterOnBucket(filterRunner, key);
|
||||||
if (items == null)
|
|
||||||
#if NET40_OR_GREATER || NETCOREAPP
|
#if NET40_OR_GREATER || NETCOREAPP
|
||||||
return;
|
});
|
||||||
#else
|
#else
|
||||||
continue;
|
}
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Execute all filters in a filter runner on a single bucket
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="filterRunner">Preconfigured filter runner to use</param>
|
||||||
|
/// <param name="bucketName">Name of the bucket to filter on</param>
|
||||||
|
private void ExecuteFilterOnBucket(FilterRunner filterRunner, string bucketName)
|
||||||
|
{
|
||||||
|
List<DatItem>? items = GetItemsForBucket(bucketName);
|
||||||
|
if (items == null)
|
||||||
|
return;
|
||||||
|
|
||||||
// Filter all items in the current key
|
// Filter all items in the current key
|
||||||
List<DatItem> newItems = [];
|
List<DatItem> newItems = [];
|
||||||
@@ -862,14 +873,8 @@ namespace SabreTools.DatFiles
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Set the value in the key to the new set
|
// Set the value in the key to the new set
|
||||||
Remove(key);
|
Remove(bucketName);
|
||||||
Add(key, newItems);
|
Add(bucketName, newItems);
|
||||||
|
|
||||||
#if NET40_OR_GREATER || NETCOREAPP
|
|
||||||
});
|
|
||||||
#else
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
Reference in New Issue
Block a user