Actually run a collections OnRemoved code when an item is removed
This commit is contained in:
@@ -96,7 +96,10 @@ 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;
|
||||||
|
|||||||
Reference in New Issue
Block a user