Click or drag to resize

CommandBase Class

Abstract base class for command classes to use in the Command pattern implementation. A base class is used instead of an interface to be able to keep the Do and Undo methods internal, as execution of commands should be done through the CommandQueue instances.
Inheritance Hierarchy

Namespace:  SD.Tools.Algorithmia.Commands
Assembly:  SD.Tools.Algorithmia (in SD.Tools.Algorithmia.dll) Version: 1.3.3.0 (1.3.18.0209)
Syntax
public abstract class CommandBase

The CommandBase type exposes the following members.

Constructors
  NameDescription
Protected methodCommandBase
Initializes a new instance of the CommandBase class.
Protected methodCommandBase(String)
Initializes a new instance of the CommandBase class.
Top
Properties
  NameDescription
Public propertyAfterDoAction
Gets or sets the after Do action, which is an action executed right after Do has been called on this command
Public propertyAfterUndoAction
Gets or sets the after Undo action, which is an action executed right after Undo has been called on this command
Public propertyBeforeDoAction
Gets or sets the before Do action, which is an action executed right before Do is called on this command
Public propertyBeforeUndoAction
Gets or sets the before Undo action, which is an action executed right before Undo is called on this command
Public propertyDescription
Gets or sets the description of the command. This description can be used to show the commands in a queue visually on a screen.
Public propertyOwnCommandQueue
Gets the own command queue of this command. This queue is then used to store commands which are spawned when this command is executed.
Top
Methods
  NameDescription
Protected methodDo
Executes the command.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodRedo
Re-executes the command. Normally this is simply calling 'Do', however in an undoable period redo it's calling PerformRedo.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Protected methodUndo
Top
See Also