public ActionCommand(TContext context, Action <TContext, object> action, Func <TContext, object, bool> getCanExecute, bool hasParameter, CommandCanExecuteCheckMode canExecuteCheckMode) { _context = context; _action = action; _getCanExecute = getCanExecute; _hasParameter = hasParameter; _canExecuteCheckMode = canExecuteCheckMode; }
internal CommandRuleBinder(Binder <TContext> binder, Action <TContext, object> executeAction, Expression <Func <TContext, object, bool> > canExecuteExpression, bool hasParameter) { _debugContext = new DebugContextBuilder(canExecuteExpression.Body, null); _binder = binder; _executeAction = executeAction; _canExecuteExpression = canExecuteExpression; _hasParameter = hasParameter; _canExecuteCheckMode = Binder.DefaultCommandCanExecuteCheckMode; }
public CommandRuleBinder <TContext> WithCanExecuteCheckMode(CommandCanExecuteCheckMode mode) { _canExecuteCheckMode = mode; return(this); }