Open sandboxFocus

Class RecordingScope

Defines the scope of a logical operation, that is, a set of changes that should be undone or redone as a whole.

Inheritance
RecordingScope
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 sealed class RecordingScope : IDisposable
Remarks

Scopes can be defined declaratively using the RecordingScopeAttribute custom attribute.

To open a scope imperatively, use the OpenScope(RecordingScopeOption) method. Use the Complete() or Dispose() method to close the scope.

By default, the RecordableAttribute aspect wraps each call to a public or internal method of a recordable object in an implicit scope, so that a call from outside the object model becomes a single logical operation.

Properties

Name Description
OperationDescriptor

Gets or sets the IOperationDescriptor for the current scope.

Methods

Name Description
Complete()

Closes the current RecordingScope and marks it as successful.

Dispose()

Closes the current RecordingScope.

See Also