protected void UnregisterCommand(INotifyCanExecuteChanged cmd) { if (commands.Contains(cmd)) { commands.Remove(cmd); } }
protected void RegisterCommand(INotifyCanExecuteChanged cmd) { if (commands.Contains(cmd)) { return; } commands.Add(cmd); }