Restored useless changes

Code cleanup
This commit is contained in:
BONNEVILLE Geoffroy
2018-08-03 17:41:52 +02:00
parent 6f96e698ec
commit e437f65f83
7 changed files with 21 additions and 30 deletions

View File

@@ -37,7 +37,7 @@ namespace ModernKeePass.Common
public RelayCommand(Action execute, Func<bool> canExecute)
{
if (execute == null)
throw new ArgumentNullException("execute");
throw new ArgumentNullException(nameof(execute));
_execute = execute;
_canExecute = canExecute;
}
@@ -72,11 +72,7 @@ namespace ModernKeePass.Common
/// </summary>
public void RaiseCanExecuteChanged()
{
var handler = CanExecuteChanged;
if (handler != null)
{
handler(this, EventArgs.Empty);
}
CanExecuteChanged?.Invoke(this, EventArgs.Empty);
}
}
}