Saxonite v1.2.10

This commit is contained in:
Andy Howard
2022-12-11 15:09:36 +00:00
parent 20addc0d92
commit 52fc9daf07
@@ -58,20 +58,16 @@ namespace Sarand.Net.Standard.Base.Core
if (key == null || value == null) return false;
lock (dictionary)
{
if (dictionary.ContainsKey(key))
if (!dictionary.ContainsKey(key))
{
// Existsing key.
// Replace value in dictionary.
dictionary[key] = value;
return true;
// New Key - Add to queue before setting value in dictionary.
queue.Enqueue(key);
}
// New Key.
// Add to queue and set value in dictionary.
queue.Enqueue(key);
// Value is set or reset in dictionary whetehr previously exists or not.
dictionary[key] = value;
return true;
}
if (SacsSystem.DebugMode) Validate();
return true;
}
//-------------------------------------------------------------------