C# Class GuiLabs.Undo.AbstractAction

Inheritance: IAction
Datei anzeigen Open project: KirillOsenkov/Undo

Public Methods

Method Description
CanExecute ( ) : bool
CanUnExecute ( ) : bool
Execute ( ) : void
TryToMerge ( IAction followingAction ) : bool

If the last action can be joined with the followingAction, the following action isn't added to the Undo stack, but rather mixed together with the current one.

UnExecute ( ) : void

Protected Methods

Method Description
ExecuteCore ( ) : void

Override execute core to provide your logic that actually performs the action

UnExecuteCore ( ) : void

Override this to provide the logic that undoes the action

Method Details

CanExecute() public method

public CanExecute ( ) : bool
return bool

CanUnExecute() public method

public CanUnExecute ( ) : bool
return bool

Execute() public method

public Execute ( ) : void
return void

ExecuteCore() protected abstract method

Override execute core to provide your logic that actually performs the action
protected abstract ExecuteCore ( ) : void
return void

TryToMerge() public method

If the last action can be joined with the followingAction, the following action isn't added to the Undo stack, but rather mixed together with the current one.
public TryToMerge ( IAction followingAction ) : bool
followingAction IAction
return bool

UnExecute() public method

public UnExecute ( ) : void
return void

UnExecuteCore() protected abstract method

Override this to provide the logic that undoes the action
protected abstract UnExecuteCore ( ) : void
return void