public AsyncCommand(Func <Task> command, INotifyCanExecute caneExecute, IFatalHandler fatalHandler) { _command = command; _caneExecute = caneExecute; _fatalHandler = fatalHandler; _caneExecute.PropertyChanged += CaneExecuteOnPropertyChanged; }
public ICommand CreateSyncCommand(Action command, INotifyCanExecute notifyCanExecute) { return(new AsyncCommand(() => new Task(command), notifyCanExecute, _fatalHandler)); }
public ICommand CreateAsyncCommand(Func <Task> command, INotifyCanExecute notifyCanExecute) { return(new AsyncCommand(command, notifyCanExecute, _fatalHandler)); }