PostSharpAPI ReferencePost­Sharp.​AspectsLocation­Interception­Aspect
Open sandboxFocus

Class LocationInterceptionAspect

Aspect that, when applied on a location (field or property), intercepts invocations of the Get (OnGetValue(LocationInterceptionArgs)) and Set (OnSetValue(LocationInterceptionArgs)) semantics.

Inheritance
LocationInterceptionAspect
Namespace: PostSharp.Aspects
Assembly: PostSharp.dll
Syntax
[MulticastAttributeUsage]
[HasInheritedAttribute]
[AspectConfigurationAttributeType]
[Serializer]
public abstract class LocationInterceptionAspect : LocationLevelAspect, ILocationLevelAspectBuildSemantics, IAspectBuildSemantics, IValidableAnnotation, ILocationInterceptionAspect, IOnInstanceLocationInitializedAspect, ILocationLevelAspect, IAspect

Constructors

Name Description
LocationInterceptionAspect() PostSharp.Aspects.LocationInterceptionAspect

Methods

Name Description
CreateAspectConfiguration()

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

OnGetValue(LocationInterceptionArgs)

Method invoked instead of the Get semantic of the field or property to which the current aspect is applied, i.e. when the value of this field or property is retrieved.

OnInstanceLocationInitialized(LocationInitializationArgs)

Method invoked after an initial value is set for a field or property to which the current aspect is applied. The method is invoked only for instance fields and instance auto-implemented properties, and it is invoked after their inline initialization. For static fields and properties, and for accesses from the constructor, OnSetValue is invoked instead.

OnSetValue(LocationInterceptionArgs)

Method invoked instead of the Set semantic of the field or property to which the current aspect is applied, i.e. when the value of this field or property is changed.