示例#1
0
 public AsyncDelegateCommand(Func <Task> commandAction, Func <bool> canExecuteFunc = null)
 {
     _commandAction  = commandAction ?? (() => null);
     _canExecuteFunc = canExecuteFunc ?? (() => true);
     CommandManger.Register(this);
 }
示例#2
0
 public DelegateCommand(Action <T> onExecute, Func <T, bool> onCanExecute = null)
 {
     _onExecute    = onExecute ?? (o => { });
     _onCanExecute = onCanExecute ?? (o => true);
     CommandManger.Register(this);
 }