public override async Task ExecuteAsync(object _) { _cancelCommand.NotifyCommandStarting(); Execution = new NotifyTaskCompletion(_command(_cancelCommand.Token)); OnPropertyChanged(nameof(Execution)); RaiseCanExecuteChanged(); await Execution.TaskCompletion; _cancelCommand.NotifyCommandFinished(); RaiseCanExecuteChanged(); }
public override async Task ExecuteAsync(object parameter) { _cancelCommand.NotifyCommandStarting(); Execution = new NotifyTaskCompletion <TResult>(_command(_cancelCommand.Token)); OnPropertyChanged("Execution"); RaiseCanExecuteChanged(); await Execution.TaskCompletion; _cancelCommand.NotifyCommandFinished(); RaiseCanExecuteChanged(); }