Beispiel #1
0
 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;
 }
Beispiel #2
0
 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;
 }
Beispiel #3
0
 public CommandRuleBinder <TContext> WithCanExecuteCheckMode(CommandCanExecuteCheckMode mode)
 {
     _canExecuteCheckMode = mode;
     return(this);
 }