C# 클래스 Microsoft.Practices.Prism.Commands.DelegateCommandBase

An ICommand whose delegates can be attached for Execute and CanExecute. It also implements the IActiveAware interface, which is useful when registering this command in a CompositeCommand that monitors command's activity.
상속: ICommand, IActiveAware
파일 보기 프로젝트 열기: xperiandri/PortablePrism

보호된 메소드들

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

Determines if the command can execute with the provided parameter by invoing the Func{Object,Bool} supplied during construction.

DelegateCommandBase ( Action executeMethod, bool>.Func canExecuteMethod ) : System

Createse a new instance of a DelegateCommandBase, specifying both the execute action and the can execute function.

Execute ( object parameter ) : void

Executes the command with the provided parameter by invoking the Action{Object} supplied during construction.

OnCanExecuteChanged ( ) : void

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

OnIsActiveChanged ( ) : void

This raises the DelegateCommandBase.IsActiveChanged event.

비공개 메소드들

메소드 설명
ICommand ( object parameter ) : bool
ICommand ( object parameter ) : void
RaiseCanExecuteChanged ( ) : void

메소드 상세

CanExecute() 보호된 메소드

Determines if the command can execute with the provided parameter by invoing the Func{Object,Bool} supplied during construction.
protected CanExecute ( object parameter ) : bool
parameter object The parameter to use when determining if this command can execute.
리턴 bool

DelegateCommandBase() 보호된 메소드

Createse a new instance of a DelegateCommandBase, specifying both the execute action and the can execute function.
protected DelegateCommandBase ( Action executeMethod, bool>.Func canExecuteMethod ) : System
executeMethod Action The to execute when is invoked.
canExecuteMethod bool>.Func The to invoked when is invoked.
리턴 System

Execute() 보호된 메소드

Executes the command with the provided parameter by invoking the Action{Object} supplied during construction.
protected Execute ( object parameter ) : void
parameter object
리턴 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

OnIsActiveChanged() 보호된 메소드

This raises the DelegateCommandBase.IsActiveChanged event.
protected OnIsActiveChanged ( ) : void
리턴 void