C# Class MONI.Util.DelegateCommand

This class allows delegating the commanding logic to methods passed as parameters, and enables a View to bind commands to objects that are not part of the element tree.
Inheritance: ICommand
Afficher le fichier Open project: dotob/moni

Méthodes publiques

Méthode Description
CanExecute ( ) : bool

Method to determine if the command can be executed if there is a accesscontrol token that is valid check for it

DelegateCommand ( System.Action executeMethod ) : System

ctor for command that can always be executed. executes given action

DelegateCommand ( System.Action executeMethod, Func canExecuteMethod ) : System

ctor for command that has canexecute func and automatic requery can be disabled and an accesscontrol token to be tested BEFORE canexecute is queried

Execute ( ) : void

Execution of the command

RaiseCanExecuteChanged ( ) : void

Raises the CanExecuteChaged event

Méthodes protégées

Méthode Description
OnCanExecuteChanged ( ) : void

Protected virtual method to raise CanExecuteChanged event

Private Methods

Méthode Description
ICommand ( object parameter ) : bool
ICommand ( object parameter ) : void

Method Details

CanExecute() public méthode

Method to determine if the command can be executed if there is a accesscontrol token that is valid check for it
public CanExecute ( ) : bool
Résultat bool

DelegateCommand() public méthode

ctor for command that can always be executed. executes given action
public DelegateCommand ( System.Action executeMethod ) : System
executeMethod System.Action action to execute
Résultat System

DelegateCommand() public méthode

ctor for command that has canexecute func and automatic requery can be disabled and an accesscontrol token to be tested BEFORE canexecute is queried
public DelegateCommand ( System.Action executeMethod, Func canExecuteMethod ) : System
executeMethod System.Action action to execute
canExecuteMethod Func func to query for canexecute
Résultat System

Execute() public méthode

Execution of the command
public Execute ( ) : void
Résultat void

OnCanExecuteChanged() protected méthode

Protected virtual method to raise CanExecuteChanged event
protected OnCanExecuteChanged ( ) : void
Résultat void

RaiseCanExecuteChanged() public méthode

Raises the CanExecuteChaged event
public RaiseCanExecuteChanged ( ) : void
Résultat void