mirror of
https://github.com/n00mkrad/flowframes.git
synced 2025-12-25 20:59:39 +01:00
Implemented state saving for resuming (WIP)
This commit is contained in:
@@ -280,11 +280,16 @@ namespace Flowframes.IO
|
||||
return oldNewNamesMap;
|
||||
}
|
||||
|
||||
public static void ReverseRenaming(Dictionary<string, string> oldNewMap, bool clearDict)
|
||||
public static async Task ReverseRenaming(Dictionary<string, string> oldNewMap, bool clearDict)
|
||||
{
|
||||
if (oldNewMap == null || oldNewMap.Count < 1) return;
|
||||
int counter = 0;
|
||||
foreach (KeyValuePair<string, string> pair in oldNewMap)
|
||||
{
|
||||
TryMove(pair.Value, pair.Key);
|
||||
if (counter % 1000 == 0)
|
||||
await Task.Delay(1);
|
||||
}
|
||||
if (clearDict)
|
||||
oldNewMap.Clear();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user