PostSharp//API Reference/Post­Sharp.​Patterns.​Recording/Operation
Open sandboxFocus

Class Operation

Base class for all operations. An operation is any change of state that can be appended to a Recorder and be therefore involved in an undo/redo operation.

Namespace: PostSharp.Patterns.Recording
Assembly: PostSharp.Patterns.Model.dll
Syntax
public abstract class Operation : Object, IOperationDescriptor

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)

Merges a given Operation into the current Operation.

Redo(ReplayContext)

Redo the current operation.

Undo(ReplayContext)

Undo the current operation.

VisitAffectedObjects(Action<Object>)

Executes a given action on all recordable objects involved with the current Operation.