Actually run a collections OnRemoved code when an item is removed

This commit is contained in:
RogueException
2015-10-14 02:25:27 -03:00
parent 1f06e81f64
commit 6373a76771

View File

@@ -96,9 +96,12 @@ namespace Discord.Collections
{ {
TValue result; TValue result;
if (_dictionary.TryRemove(key, out result)) if (_dictionary.TryRemove(key, out result))
{
OnRemoved(result);
return result; return result;
} }
} }
}
return null; return null;
} }
protected TValue Remap(string oldKey, string newKey) protected TValue Remap(string oldKey, string newKey)