Saxonite v1.2.10
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user