PostSharp.ILAPI ReferencePost­Sharp.​AspectsInstance­Level­Aspect
Open sandboxFocus

InstanceLevelAspect Class

Base class for aspects applied on types, but having the same lifetime as instances of the type to which they are applied.

Namespace: PostSharp.Aspects
Assembly: PostSharp.dll
Syntax
[HasInheritedAttribute]
[MulticastAttributeUsage]
[Serializer]
public abstract class InstanceLevelAspect : TypeLevelAspect, ITypeLevelAspect, ITypeLevelAspectBuildSemantics, IAspectBuildSemantics, IValidableAnnotation, ICloneAwareAspect, IInstanceScopedAspect, IAspect

Constructors

Name Description
InstanceLevelAspect() PostSharp.Aspects.InstanceLevelAspect

Properties

Name Description
Instance

Gets the object to which the current aspect has been applied.

Methods

Name Description
CreateAspectConfiguration()

Method invoked at build time to create a concrete AspectConfiguration instance specifically for the current Aspect type.

CreateInstance(AdviceArgs)

Creates a new instance of the aspect based on the current instance, serving as a prototype.

OnCloned(ICloneAwareAspect)

Method called after the an object enhanced by the current aspect has been cloned using System.Object.MemberwiseClone(). The this parameter refers to the new aspect instance in the cloned object.

RuntimeInitializeInstance()

Initializes the aspect instance. This method is invoked when all system elements of the aspect (like member imports) have completed.