[DatFile] Add async variant of ParseAddHelper

This commit is contained in:
Matt Nadareski
2017-03-21 11:45:52 -07:00
parent 6c4485961c
commit a2c5672bfd

View File

@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Xml;
using SabreTools.Helper.Data;
@@ -2803,7 +2804,7 @@ namespace SabreTools.Helper.Dats
/// <param name="item">Item data to check against</param>
/// <param name="clean">True if the names should be cleaned to WoD standards, false otherwise</param>
/// <param name="remUnicode">True if we should remove non-ASCII characters from output, false otherwise (default)</param>
/// <param name="key">Output param containing the key for the item</param>
/// <returns>The key for the item</returns>
private string ParseAddHelper(DatItem item, bool clean, bool remUnicode)
{
string key = "";
@@ -2966,6 +2967,18 @@ namespace SabreTools.Helper.Dats
return key;
}
/// <summary>
/// Add a rom to the Dat after checking
/// </summary>
/// <param name="item">Item data to check against</param>
/// <param name="clean">True if the names should be cleaned to WoD standards, false otherwise</param>
/// <param name="remUnicode">True if we should remove non-ASCII characters from output, false otherwise (default)</param>
/// <returns>The key for the item</returns>
private async Task<string> ParseAddHelperAsync(DatItem item, bool clean, bool remUnicode)
{
return await Task.Run(() => ParseAddHelper(item, clean, remUnicode));
}
#endregion
}
}