Open sandboxFocus

Class RecordingScopeAttribute

Custom attribute that, when applied to a method, defines the characteristics of the RecordingScope that corresponds to the target method.

Inheritance
RecordingScopeAttribute
Namespace: PostSharp.Patterns.Recording
Assembly: PostSharp.Patterns.Model.dll
Syntax
[AttributeUsage(AttributeTargets.Method|AttributeTargets.Property, AllowMultiple = false)]
[MulticastAttributeUsage(MulticastTargets.Method, Inheritance = MulticastInheritance.Strict, PersistMetaData = true)]
[Obsolete("[Recordable] aspect and its components are deprecated and will be removed in a future version.", false)]
public sealed class RecordingScopeAttribute : MulticastAttribute
Remarks

Use the Name property to give the logical operation a user-friendly name. Use Skip to prevent the method from opening a scope, for instance when the method opens a scope itself with OpenScope(string, RecordingScopeOption). Use Atomic to roll back the changes made by the method when it throws an exception.

Constructors

Name Description
RecordingScopeAttribute(RecordingScopeOption)

Initializes a new instance of the RecordingScopeAttribute class.

RecordingScopeAttribute(string, RecordingScopeOption)

Initializes a new instance of the RecordingScopeAttribute class and specifies the scope name.

Properties

Name Description
Name

Gets the scope name.

Option

Gets the scope option.

See Also