Beispiel #1
0
        public AsyncCommand(Func <Task> command, INotifyCanExecute caneExecute, IFatalHandler fatalHandler)
        {
            _command      = command;
            _caneExecute  = caneExecute;
            _fatalHandler = fatalHandler;

            _caneExecute.PropertyChanged += CaneExecuteOnPropertyChanged;
        }
Beispiel #2
0
 public ICommand CreateSyncCommand(Action command, INotifyCanExecute notifyCanExecute)
 {
     return(new AsyncCommand(() => new Task(command), notifyCanExecute, _fatalHandler));
 }
Beispiel #3
0
 public ICommand CreateAsyncCommand(Func <Task> command, INotifyCanExecute notifyCanExecute)
 {
     return(new AsyncCommand(command, notifyCanExecute, _fatalHandler));
 }