PostSharpAPI ReferencePost­Sharp.​Patterns.​RecordingRecordable­Attribute
Open sandboxFocus

RecordableAttribute Class

Custom attribute that, when applied to a class, instruments fields and methods of this class so that it can be involved in undo/redo operations.

Namespace: PostSharp.Patterns.Recording
Assembly: PostSharp.Patterns.Model.dll
Syntax
[IntroduceInterface]
[IntroduceInterface]
[MulticastAttributeUsage]
[Metric("UsedFeatures", "PostSharp.Patterns.Recording.Recordable")]
[ProvideAspectRole("ChangeTracking")]
[AspectRoleDependency]
[AspectRoleDependency]
[AspectRoleDependency]
[AspectRoleDependency]
[AspectRoleDependency]
[AspectRoleDependency]
[AspectTypeDependency]
[AspectRoleDependency]
[AspectRoleDependency]
[AspectTypeDependency]
[HasConstraint]
[Serializer]
public sealed class RecordableAttribute : InstanceLevelAspect, ITypeLevelAspect, ITypeLevelAspectBuildSemantics, IAspectBuildSemantics, IValidableAnnotation, ICloneAwareAspect, IInstanceScopedAspect, IRecordable, IAspectProvider, IAspect, IService, IQueryInterface, IDynamicInterfaceImplementation

Constructors

Name Description
RecordableAttribute()

Initializes a new instance of the RecordableAttribute class.

RecordableAttribute(PortableFormatterConstructorContext)

Fields

Name Description
BaseQueryInterface
OnChildAttachedMethod
OnParentChangedBaseMethod
QueryInterfaceMethod

Properties

Name Description
AutoRecord

Determines whether changes in this object must be recorded as soon as the object constructor has completed.

ProvideMethodContext

Determines whether full method invocation context is provided to the MethodExecutionOperationDescriptor class for use in a custom OperationFormatter. This property is set to false by default for performance reasons.

Methods

Name Description
CompileTimeInitialize(Type, AspectInfo)

Method invoked at build time to initialize the instance fields of the current aspect. This method is invoked before any other build-time method.

CompileTimeValidate(Type)

Method invoked at build time to ensure that the aspect has been applied to the right target.

OnChildAttached(Object, ChildInfo)
OnInstanceConstructed()
OnMethodEntry(MethodExecutionArgs)
OnMethodEntryNoContext(MethodExecutionArgs)
OnMethodExit(MethodExecutionArgs)
OnMethodExitNoContext(MethodExecutionArgs)
QueryInterface(Type)
QueryInterface<T>()
RuntimeInitializeInstance(AspectInitializationReason)

Explicit Interface Implementations

Name Description
IAspectProvider.ProvideAspects(Object)

Provides new aspects.

IDynamicInterfaceImplementation.AdvisedObject
IRecordable.HasRecorder(Boolean)

Determines whether the current object is attached to a Recorder, if not, optionally attaches the object to the default Recorder.

IRecordable.Recorder

Gets the recorder attached to the current object.

See Also