public AsyncCommand(Func <CancellationToken, object, Task <TResult> > command, Predicate <object> canExecute) { this.command = command; this.canExecute = canExecute; cancelCommand = new CancelAsyncCommand(); }
public AsyncCommand(Func <CancellationToken, Task <TResult> > command) { _command = command; _cancelCommand = new CancelAsyncCommand(); }
public AsyncCommand(string name, Func <CancellationToken, Task <TResult> > command) { _command = command; _cancelCommand = new CancelAsyncCommand(); Name = name; }
/// <summary> /// Base constructor for asynchronous command. /// </summary> /// <param name="canExecute">The implementation of <see cref="ICommand.CanExecute(object)"/>.</param> protected AsyncCommandBase(Func <object, bool> canExecute = null) { _cancelCommand = new CancelAsyncCommand(); _canExecute = canExecute; _canExecuteChanged = new WeakCanExecuteChanged(this); }
public AsyncCommandEx(Func <T, CancellationToken, Task> command) { _command = command; _cancelCommand = new CancelAsyncCommand(); }
public DelegateAsyncCommand(Func <CancellationToken, Task <T> > command) { _command = command; _cancelCommand = new CancelAsyncCommand(); }
public AsyncCommand(Func <Task <TResult> > command, Predicate <object> canExecute) { _command = command; _canExecute = canExecute; _cancelCommand = new CancelAsyncCommand(); }
public DelegateCommandEx(Func <object, CancellationToken, Task <T> > command) { _command = command; _cancelCommand = new CancelAsyncCommand(); }
public AsyncCommand(Func <Task <TResult> > command) { _command = command; _cancelCommand = new CancelAsyncCommand(); }
public AsyncCommand(Func <CancellationToken, Task <TResult> > command) { _command = command ?? throw new ArgumentNullException(nameof(command)); _cancelCommand = new CancelAsyncCommand(); }
/// <summary> /// Constructor /// </summary> /// <param name="canExecute">Can execute predicate</param> /// <param name="command">Command</param> public AsyncCommand(Predicate <object> canExecute, Func <object, CancellationToken, Task <TResult> > command) { _command = command; _cancelCommand = new CancelAsyncCommand(); _canExecute = canExecute; }
public AsyncCommand(Func <Object, CancellationToken, Task <TResult> > parametrizedCommand) { _ParametrizedCommand = parametrizedCommand; _CancelCommand = new CancelAsyncCommand(); }
//TODO: Implement _canExecute in AsyncCommand<TResult> public CancellableAsyncCommand(Func <CancellationToken, Task <TResult> > execute, Func <bool> canExecute) { _cancelCommand = new CancelAsyncCommand(); _canExecute = canExecute; _execute = execute; }