C# Class Catel.MVVM.CompositeCommand

Composite command which allows several commands inside a single command being exposed to a view.
Inheritance: Command, ICompositeCommand
Afficher le fichier Open project: Catel/Catel Class Usage Examples

Méthodes publiques

Méthode Description
CompositeCommand ( ) : System

Initializes a new instance of the Command{TCanExecuteParameter,TExecuteParameter} class.

GetActions ( ) : IEnumerable

Gets the actions currently registered to this composite command.

GetActionsWithParameter ( ) : IEnumerable>

Gets the actions with parameters currently registered to this composite command.

GetCommands ( ) : IEnumerable

Gets the commands currently registered to this composite command.

RegisterAction ( System.Action action ) : void

Registers the specified action.

RegisterAction ( Action action ) : void

Registers the specified action.

RegisterCommand ( ICommand command, IViewModel viewModel = null ) : void

Registers the specified command.

Note that if the view model is not specified, the command must be unregistered manually in order to prevent memory leaks.

UnregisterAction ( System.Action action ) : void

Unregisters the specified action.

UnregisterAction ( Action action ) : void

Unregisters the specified action.

UnregisterCommand ( ICommand command ) : void

Unregisters the specified command.

Private Methods

Méthode Description
CanExecuteCompositeCommand ( object parameter ) : bool
ExecuteCompositeCommand ( object parameter ) : void
OnCommandCanExecuteChanged ( object sender, EventArgs e ) : void

Method Details

CompositeCommand() public méthode

Initializes a new instance of the Command{TCanExecuteParameter,TExecuteParameter} class.
public CompositeCommand ( ) : System
Résultat System

GetActions() public méthode

Gets the actions currently registered to this composite command.
public GetActions ( ) : IEnumerable
Résultat IEnumerable

GetActionsWithParameter() public méthode

Gets the actions with parameters currently registered to this composite command.
public GetActionsWithParameter ( ) : IEnumerable>
Résultat IEnumerable>

GetCommands() public méthode

Gets the commands currently registered to this composite command.
public GetCommands ( ) : IEnumerable
Résultat IEnumerable

RegisterAction() public méthode

Registers the specified action.
The is null.
public RegisterAction ( System.Action action ) : void
action System.Action The action.
Résultat void

RegisterAction() public méthode

Registers the specified action.
The is null.
public RegisterAction ( Action action ) : void
action Action The action.
Résultat void

RegisterCommand() public méthode

Registers the specified command.
Note that if the view model is not specified, the command must be unregistered manually in order to prevent memory leaks.
The is null.
public RegisterCommand ( ICommand command, IViewModel viewModel = null ) : void
command ICommand The command.
viewModel IViewModel The view model. If specified, the command will automatically be unregistered when the view model is closed.
Résultat void

UnregisterAction() public méthode

Unregisters the specified action.
The is null.
public UnregisterAction ( System.Action action ) : void
action System.Action The action.
Résultat void

UnregisterAction() public méthode

Unregisters the specified action.
The is null.
public UnregisterAction ( Action action ) : void
action Action The action.
Résultat void

UnregisterCommand() public méthode

Unregisters the specified command.
The is null.
public UnregisterCommand ( ICommand command ) : void
command ICommand The command.
Résultat void