Move bucketing away from Field

This commit is contained in:
Matt Nadareski
2020-12-14 15:31:28 -08:00
parent 7f7c3ec314
commit 52d1673cb8
8 changed files with 63 additions and 63 deletions

View File

@@ -366,14 +366,8 @@ namespace SabreTools.DatItems
#region Sorting and Merging
/// <summary>
/// Get the dictionary key that should be used for a given item and bucketing type
/// </summary>
/// <param name="bucketedBy">Field enum representing what key to get</param>
/// <param name="lower">True if the key should be lowercased (default), false otherwise</param>
/// <param name="norename">True if games should only be compared on game and file name, false if system and source are counted</param>
/// <returns>String representing the key to be used for the DatItem</returns>
public override string GetKey(Field bucketedBy, bool lower = true, bool norename = true)
/// <inheritdoc/>
public override string GetKey(ItemKey bucketedBy, bool lower = true, bool norename = true)
{
// Set the output key as the default blank string
string key = string.Empty;
@@ -381,11 +375,11 @@ namespace SabreTools.DatItems
// Now determine what the key should be based on the bucketedBy value
switch (bucketedBy)
{
case Field.DatItem_MD5:
case ItemKey.MD5:
key = MD5;
break;
case Field.DatItem_SHA1:
case ItemKey.SHA1:
key = SHA1;
break;