projects/wms-framework/src/lib/baseframework/ICommand.ts
Represents a Command that can be executed.
Properties |
Methods |
CanExecute | ||||||
CanExecute(parameter?: any)
|
||||||
Query if the command can be executed.
Parameters :
Returns :
boolean
{boolean} |
Execute | ||||||
Execute(parameter?: any)
|
||||||
Executes the command if it can be executed.
Parameters :
Returns :
void
|
CanExecuteChanged |
CanExecuteChanged:
|
Type : SubscriptionEvent<any>
|
Event trigerred when |
import { SubscriptionEvent } from '../utils/SubscriptionEvent';
/**
* Represents a Command that can be executed.
*
* @export
* @interface ICommand
* @wInterface System.Windows.Input.ICommand
*/
export interface ICommand {
/**
* Event trigerred when `CanExecute` changes its value.
*
* @type {SubscriptionEvent<any>}
* @memberof ICommand
*/
CanExecuteChanged: SubscriptionEvent<any>;
/**
* Query if the command can be executed.
*
* @param {*} [parameter]
* @return {*} {boolean} `true` the command can be executed, `false` otherwise.
* @memberof ICommand
*/
CanExecute(parameter?: any): boolean;
/**
* Executes the command if it can be executed.
*
* @param {*} [parameter]
* @memberof ICommand
*/
Execute(parameter?: any): void;
}