PostSharpAPI ReferencePost­Sharp.​Patterns.​RecordingRecorder
Open sandboxFocus

Recorder Class

Records changed done on an object model and allow to undo and redo them.

Inheritance
Recorder
Namespace: PostSharp.Patterns.Recording
Assembly: PostSharp.Patterns.Model.dll
Syntax
public sealed class Recorder : Object, INotifyChildPropertyChanged

Constructors

Name Description
Recorder()

Initializes a new instance of the Recorder class.

Recorder(Object)

Initializes a new instance of the Recorder class and attaches it to a given object.

Properties

Name Description
CanAddRestorePoint

Determines if the AddRestorePoint(String) method can be invoked.

CanRedo

Determines if the Redo() method can be invoked.

CanUndo

Determines if the Undo() method can be invoked.

MaximumOperationsCount

Gets the maximum number of operations in the UndoOperations and RedoOperations collections. These collections are automatically trimmed so that their size never exceeds MaximumOperationsCount.

RedoOperations

Gets the collection of operations that can be redone using the Redo() method.

UndoOperations

Gets the collection of operations that can be undone using the Undo() method.

Methods

Name Description
AddOperation(Operation)

Adds a new Operation to UndoOperations collection of the current Recorder.

AddRestorePoint(String)

Adds new restore point with given name.

Attach(Object)

Attaches a recordable object (including its descendant objects) to the current Recorder so that changes in this objects start being recorded into the current Recorder.

Clear()

Clears undo and redo lists.

Detach(Object)

Detaches a recordable object from the current Recorder, so that changes in this objects stop being recorded into the current Recorder.

OpenScope(RecordingScopeOption)

Opens an unnamed RecordingScope.

OpenScope(String, RecordingScopeOption)

Opens a RecordingScope with a given name.

Redo()

Redo last operation.

RedoTo(Operation)

redo all operation to specific operation.

Undo()

Undo last operation.

UndoTo(Operation)

Undo all operations to specific Operation or RestorePoint.

Events

Name Description
ChildPropertyChanged

Event raised after the property of a child object has been changed.

ChildPropertyChanging

Event raised before the property of a child object is changed.

PropertyChanged

Event raised when the value of a property of the current object changes.