C# Класс Catel.MVVM.CompositeCommand

Composite command which allows several commands inside a single command being exposed to a view.
Наследование: Command, ICompositeCommand
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
CanExecuteCompositeCommand ( object parameter ) : bool
ExecuteCompositeCommand ( object parameter ) : void
OnCommandCanExecuteChanged ( object sender, EventArgs e ) : void

Описание методов

CompositeCommand() публичный Метод

Initializes a new instance of the Command{TCanExecuteParameter,TExecuteParameter} class.
public CompositeCommand ( ) : System
Результат System

GetActions() публичный Метод

Gets the actions currently registered to this composite command.
public GetActions ( ) : IEnumerable
Результат IEnumerable

GetActionsWithParameter() публичный Метод

Gets the actions with parameters currently registered to this composite command.
public GetActionsWithParameter ( ) : IEnumerable>
Результат IEnumerable>

GetCommands() публичный Метод

Gets the commands currently registered to this composite command.
public GetCommands ( ) : IEnumerable
Результат IEnumerable

RegisterAction() публичный Метод

Registers the specified action.
The is null.
public RegisterAction ( System.Action action ) : void
action System.Action The action.
Результат void

RegisterAction() публичный Метод

Registers the specified action.
The is null.
public RegisterAction ( Action action ) : void
action Action The action.
Результат void

RegisterCommand() публичный Метод

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.
Результат void

UnregisterAction() публичный Метод

Unregisters the specified action.
The is null.
public UnregisterAction ( System.Action action ) : void
action System.Action The action.
Результат void

UnregisterAction() публичный Метод

Unregisters the specified action.
The is null.
public UnregisterAction ( Action action ) : void
action Action The action.
Результат void

UnregisterCommand() публичный Метод

Unregisters the specified command.
The is null.
public UnregisterCommand ( ICommand command ) : void
command ICommand The command.
Результат void