public void UnregisterAction(Action action)
{
Argument.IsNotNull("action", action);
lock (_lock)
{
for (var i = _actions.Count - 1; i >= 0; i--)
{
// Check for both ReferenceEquals (original implementation) and == (to fix CTL-654)
if (ReferenceEquals(_actions[i], action) || _actions[i] == action)
{
_actions.RemoveAt(i);
Log.Debug("Unregistered action from CompositeCommand");
}
}
}
}