/// <summary> /// Initializes a new instance of the <see cref="DelegateCommand"/> class. /// </summary> /// <param name="exec">The execute method</param> /// <param name="canExecutePredicate">Predicate Function without object parameter</param> public DelegateCommand(ExecuteMethodWithParameter exec, Func <bool> canExecutePredicate) : this(exec) { canExecute = (obj) => { return(canExecutePredicate.Invoke()); }; }
/// <summary> /// Initializes a new instance of the <see cref="DelegateCommand"/> class. /// </summary> /// <param name="exec">The execute method that takes a parameter</param> /// <param name="canExecutePredicate">Predicate Function with object parameter</param> public DelegateCommand(ExecuteMethodWithParameter exec, Func <object, bool> canExecutePredicate) : this(exec) { canExecute = canExecutePredicate; }
/// <summary> /// Initializes a new instance of the <see cref="DelegateCommand"/> class. /// </summary> /// <param name="exec">The execute method that takes a parameter</param> public DelegateCommand(ExecuteMethodWithParameter exec) { executeMethodWithParam = exec; }