PostSharpAPI ReferencePost­Sharp.​Patterns.​RecordingRecorderOpen­Scope
Open sandboxFocus

Recorder.OpenScope Method

OpenScope(RecordingScopeOption)

Opens an unnamed RecordingScope.

Declaration
public RecordingScope OpenScope(RecordingScopeOption option)
Parameters
Type Name Description
RecordingScopeOption option

Scope options. Specify this parameter if you want the scope to be Atomic.

Returns
Type Description
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.

OpenScope(String, RecordingScopeOption)

Opens a RecordingScope with a given name.

Declaration
public RecordingScope OpenScope(string name, RecordingScopeOption option)
Parameters
Type Name Description
String name

The scope name, or null to create an unnamed scope.

RecordingScopeOption option

Scope options. Specify this parameter if you want the scope to be Atomic.

Returns
Type Description
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.