Example #1
0
 public AsyncCommand(Func <object, Task> command, Func <object, bool>?checker, ExecutableKey?key = null)
 {
     Command = command;
     Checker = checker;
     if (key == null)
     {
         Key = new ExecutableKey();
     }
     else
     {
         Key = key;
     }
     Key.StateChanged += Key_StateChanged;
 }
Example #2
0
 private void Key_StateChanged(ExecutableKey arg1, bool arg2) =>
 CanExecuteChanged(this, new EventArgs());