mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-14 20:25:01 +00:00
Fixing bug in dictionary extensions, additional tests
This commit is contained in:
@@ -21,15 +21,11 @@ namespace ICD.Common.Utils.Extensions
|
||||
if (extends == null)
|
||||
throw new ArgumentNullException("extends");
|
||||
|
||||
try
|
||||
{
|
||||
TKey key = extends.GetKey(value);
|
||||
return extends.Remove(key);
|
||||
}
|
||||
catch (ArgumentOutOfRangeException)
|
||||
{
|
||||
TKey key;
|
||||
if (!extends.TryGetKey(value, out key))
|
||||
return false;
|
||||
}
|
||||
|
||||
return extends.Remove(key);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user