C# Class NanoByte.Common.Undo.FirstExecuteCommand

An undo command that does something different on the first call to Execute than on subsequent redo calls.
Inheritance: IUndoCommand
Datei anzeigen Open project: nano-byte/common

Public Methods

Method Description
Execute ( ) : void

Performs the desired action.

Undo ( ) : void

Undoes the changes made by Execute.

Protected Methods

Method Description
OnFirstExecute ( ) : void

Template method to perform the desired action the first time.

OnRedo ( ) : void

Template method to perform the desired action again.

OnUndo ( ) : void

Template method to undo the changes made by OnFirstExecute or OnRedo.

Method Details

Execute() public method

Performs the desired action.
public Execute ( ) : void
return void

OnFirstExecute() protected abstract method

Template method to perform the desired action the first time.
protected abstract OnFirstExecute ( ) : void
return void

OnRedo() protected abstract method

Template method to perform the desired action again.
protected abstract OnRedo ( ) : void
return void

OnUndo() protected abstract method

Template method to undo the changes made by OnFirstExecute or OnRedo.
protected abstract OnUndo ( ) : void
return void

Undo() public method

Undoes the changes made by Execute.
public Undo ( ) : void
return void