PostSharp 2023.0 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Recording Namespace / Recording­Scope­Option Enumeration

RecordingScopeOption Enumeration

Enumerates the kinds of recording scope.

Namespace:  PostSharp.Patterns.Recording
Assembly:  PostSharp.Patterns.Model (in PostSharp.Patterns.Model.dll) Version: 2023.0.3.0 (2023.0.3.0)
public enum RecordingScopeOption
  Member nameValueDescription
Default0 For declarative scopes, a RecordingScope is automatically opened for the first public method of a recordable object on the call stack.
Skip1 Prevents a RecordingScope to be automatically opened for the target method. Cannot be used with OpenScope(RecordingScopeOption).
Atomic2 Causes changes in the RecordingScope to be rolled back if the scope execution is not successful. In case of declarative scope (RecordingScopeAttribute), it means that changes done by the method will be rolled back if the method results in an exception. For imperative scopes (OpenScope(RecordingScopeOption), the changes will be rolled back if the scope is disposed by the Dispose() method without previous call to the Complete() method. Unlike normal scopes, atomic scopes are nested. However, only the top scope can be seen in the UndoOperations and RedoOperations collections.
See Also