public CommandBase(ICanExecuteRequeryStrategy strategy = null) { this.CanExecuteRequeryStrategy = strategy; if (this.CanExecuteRequeryStrategy != null) { this.CanExecuteRequeryStrategy.RegisterCommand(this); } }
public DelegateCommand(Action executed, Func <bool> canExecute, ICanExecuteRequeryStrategy strategy = null) : base(strategy) { if (executed == null) { throw new ArgumentNullException(nameof(executed)); } this._canExecute = canExecute; this._executed = executed; }
protected DelegateCommand(ICanExecuteRequeryStrategy strategy) : base(strategy) { }
public AsyncDelegateCommand(Func <T, Task> execute, Func <T, Task <bool> > canExecute, ICanExecuteRequeryStrategy strategy) : base(true, strategy) { if (canExecute == null) { throw new ArgumentNullException(nameof(canExecute)); } this._execute = execute; this._canExecuteAsync = canExecute; }
public AsyncDelegateCommand(Func <T, Task> execute, Func <T, bool> canExecute = null, ICanExecuteRequeryStrategy strategy = null) : base(false, strategy) { this._execute = execute; this._canExecute = canExecute; this.IsEnabled = this._canExecute == null; }
public AsyncCommand(bool asyncCanExecute, ICanExecuteRequeryStrategy strategy) : base(strategy) { this.IsEnabled = false; this._asyncCanExecute = asyncCanExecute; }