Base class for all operations. An operation is any change of state that can be appended to a Recorder and therefore be involved in an undo/redo operation.
Inheritance
Implements
Namespace: PostSharp.Patterns.Recording
Assembly: PostSharp.Patterns.Model.dll
Syntax
[Obsolete("[Recordable] aspect and its components are deprecated and will be removed in a future version.", false)]
public abstract class Operation : IOperationDescriptorRemarks
To record a custom change, derive a class from Operation, implement the Undo(ReplayContext) and Redo(ReplayContext) methods, and append instances to the history with the AddOperation(Operation) method.
Constructors
| Name | Description |
|---|---|
| Operation() | Initializes a new instance of the Operation class. |
Properties
| Name | Description |
|---|---|
| Name | Gets the operation name. |
| OperationDescriptor | Gets the IOperationDescriptor, which is used by the OperationFormatter to produce a human-readable description of the current operation. |
| OperationKind | Gets the kind of operation. |
Methods
| Name | Description |
|---|---|
| GetMergeStatus(Operation) | Determines how a given Operation can be merged with the current Operation. |
| Merge(Operation) | |
| Redo(ReplayContext) | Redoes the current operation. |
| Undo(ReplayContext) | Undoes the current operation. |
| VisitAffectedObjects(Action<object>) | Executes a given action on all recordable objects involved with the current Operation. |