C# 클래스 MahTweets.Core.Commands.CompositeCommand

The CompositeCommand composites one or more ICommands.
상속: ICommand
파일 보기 프로젝트 열기: nickhodge/MahTweets.LawrenceHargrave

공개 메소드들

메소드 설명
CanExecute ( object parameter ) : bool

Forwards ICommand.CanExecute to the registered commands and returns if all of the commands return .

CompositeCommand ( ) : System

Initializes a new instance of CompositeCommand.

CompositeCommand ( bool monitorCommandActivity ) : System

Initializes a new instance of CompositeCommand.

Execute ( object parameter ) : void

Forwards ICommand.Execute to the registered commands.

RegisterCommand ( ICommand command ) : void

Adds a command to the collection and signs up for the ICommand.CanExecuteChanged event of it.

If this command is set to monitor command activity, and command implements the IActiveAware interface, this method will subscribe to its IActiveAware.IsActiveChanged event.

UnregisterCommand ( ICommand command ) : void

Removes a command from the collection and removes itself from the ICommand.CanExecuteChanged event of it.

보호된 메소드들

메소드 설명
OnCanExecuteChanged ( ) : void

Raises ICommand.CanExecuteChanged on the UI thread so every command invoker can requery ICommand.CanExecute to check if the CompositeCommand can execute.

ShouldExecute ( ICommand command ) : bool

Evaluates if a command should execute.

If this command is set to monitor command activity, and command implements the IActiveAware interface, this method will return if the command's IActiveAware.IsActive property is ; otherwise it always returns .

비공개 메소드들

메소드 설명
Command_IsActiveChanged ( object sender, EventArgs e ) : void

Handler for IsActiveChanged events of registered commands.

OnRegisteredCommandCanExecuteChanged ( object sender, EventArgs e ) : void

메소드 상세

CanExecute() 공개 메소드

Forwards ICommand.CanExecute to the registered commands and returns if all of the commands return .
public CanExecute ( object parameter ) : bool
parameter object Data used by the command. /// If the command does not require data to be passed, this object can be set to . ///
리턴 bool

CompositeCommand() 공개 메소드

Initializes a new instance of CompositeCommand.
public CompositeCommand ( ) : System
리턴 System

CompositeCommand() 공개 메소드

Initializes a new instance of CompositeCommand.
public CompositeCommand ( bool monitorCommandActivity ) : System
monitorCommandActivity bool Indicates when the command activity is going to be monitored.
리턴 System

Execute() 공개 메소드

Forwards ICommand.Execute to the registered commands.
public Execute ( object parameter ) : void
parameter object Data used by the command. /// If the command does not require data to be passed, this object can be set to . ///
리턴 void

OnCanExecuteChanged() 보호된 메소드

Raises ICommand.CanExecuteChanged on the UI thread so every command invoker can requery ICommand.CanExecute to check if the CompositeCommand can execute.
protected OnCanExecuteChanged ( ) : void
리턴 void

RegisterCommand() 공개 메소드

Adds a command to the collection and signs up for the ICommand.CanExecuteChanged event of it.
If this command is set to monitor command activity, and command implements the IActiveAware interface, this method will subscribe to its IActiveAware.IsActiveChanged event.
public RegisterCommand ( ICommand command ) : void
command ICommand The command to register.
리턴 void

ShouldExecute() 보호된 메소드

Evaluates if a command should execute.
If this command is set to monitor command activity, and command implements the IActiveAware interface, this method will return if the command's IActiveAware.IsActive property is ; otherwise it always returns .
protected ShouldExecute ( ICommand command ) : bool
command ICommand The command to evaluate.
리턴 bool

UnregisterCommand() 공개 메소드

Removes a command from the collection and removes itself from the ICommand.CanExecuteChanged event of it.
public UnregisterCommand ( ICommand command ) : void
command ICommand The command to unregister.
리턴 void