Created
October 23, 2019 04:41
-
-
Save IntegerMan/511dba19ad3c6b165bd813a2cf61b0fd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ActionCommand : ICommand | |
{ | |
private readonly Action _invokedAction; | |
public ActionCommand(Action invokedAction) | |
{ | |
_invokedAction = invokedAction; | |
} | |
public bool CanExecute(object parameter) => true; | |
public void Execute(object parameter) => _invokedAction?.Invoke(); | |
public event EventHandler CanExecuteChanged; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment