This is the online documentation for PostSharp 5.0.
Download PDF or CHM. Go to v4.3 or v5.0

Recorder.OpenScope Method (String, RecordingScopeOption)

Opens a RecordingScope with a given name.

Namespace:  PostSharp.Patterns.Recording
Assembly:  PostSharp.Patterns.Model (in PostSharp.Patterns.Model.dll) Version: 5.0.34.0 (5.0.34.0)
Syntax
C#
public RecordingScope OpenScope(
	string name,
	RecordingScopeOption option = RecordingScopeOption.Default
)

Parameters

name
Type: System.String
The scope name, or null to create an unnamed scope.
option (Optional)
Type: PostSharp.Patterns.Recording.RecordingScopeOption
Scope options. Specify this parameter if you want the scope to be Atomic.

Return Value

Type: RecordingScope
A RecordingScope object, which should be closed using Complete() or Dispose().
Remarks

The name of the scope can be set at any time by setting the OperationDescriptor property.

See Also