public AsyncPredicateValidator(Func<object, object, PropertyValidatorContext, CancellationToken, Task<bool>> predicate)
			: base(() => Messages.predicate_error)
		{
			predicate.Guard("A predicate must be specified.");
			this.predicate = predicate;
		}
Example #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DelegateCommand" /> class.
 /// </summary>
 /// <param name="execute">The execute.</param>
 /// <param name="canExecute">The can execute.</param>
 public DelegateCommand(Action execute, Func<bool> canExecute)
     : this(execute)
 {
     canExecute.Guard("canExecute");
     this.canExecute = canExecute;
 }