Table of Contents

Class Operation

Namespace
TimeCockpit.Data.UndoRedo
Assembly
TimeCockpit.Data.dll

abstract base class for undoable operations within a change tracker.

public abstract class Operation
Inheritance
Object
Operation
Derived
Inherited Members
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()

Constructors

Operation()

protected Operation()

Methods

Redo(ChangeTracker)

called when the operation is to be re applied.

public abstract void Redo(ChangeTracker changeTracker)

Parameters

changeTracker ChangeTracker

the change tracker tracking this operation.

TryMerge(Operation, ChangeTracker)

called when the operation should possibly be merged with the preceeding operation. mainly for setmember operations. The default operation returns false, as most operations cannot be merged.

public virtual bool TryMerge(Operation newOperation, ChangeTracker changeTracker)

Parameters

newOperation Operation

the other operation to merge with.

changeTracker ChangeTracker

the change tracker governing this operation.

Returns

Boolean

Returns true if the other operation was merged into this operation and can therefore be discarded.

Undo(ChangeTracker)

called when the operation is to be undone.

public abstract void Undo(ChangeTracker changeTracker)

Parameters

changeTracker ChangeTracker

the change tracker tracking this operation.