From a2c5672bfdb61a3994bf9a55228f9df6d0323c80 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Tue, 21 Mar 2017 11:45:52 -0700 Subject: [PATCH] [DatFile] Add async variant of ParseAddHelper --- .../Dats/Partials/DatFile.Parsers.cs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/SabreTools.Helper/Dats/Partials/DatFile.Parsers.cs b/SabreTools.Helper/Dats/Partials/DatFile.Parsers.cs index 326fadab..791ced33 100644 --- a/SabreTools.Helper/Dats/Partials/DatFile.Parsers.cs +++ b/SabreTools.Helper/Dats/Partials/DatFile.Parsers.cs @@ -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 /// Item data to check against /// True if the names should be cleaned to WoD standards, false otherwise /// True if we should remove non-ASCII characters from output, false otherwise (default) - /// Output param containing the key for the item + /// The key for the item private string ParseAddHelper(DatItem item, bool clean, bool remUnicode) { string key = ""; @@ -2966,6 +2967,18 @@ namespace SabreTools.Helper.Dats return key; } + /// + /// Add a rom to the Dat after checking + /// + /// Item data to check against + /// True if the names should be cleaned to WoD standards, false otherwise + /// True if we should remove non-ASCII characters from output, false otherwise (default) + /// The key for the item + private async Task ParseAddHelperAsync(DatItem item, bool clean, bool remUnicode) + { + return await Task.Run(() => ParseAddHelper(item, clean, remUnicode)); + } + #endregion } }