PostSharp SDK 2023.0 / / Class Reference / Post­Sharp.​Sdk.​Aspect­Infrastructure Namespace / Transformation­Context Class / Transformation­Context Properties / Transformation­Context.​Target­Element Property

TransformationContext.TargetElement Property

Gets the element of code being currently transformed by the transformation pipeline. The pipeline may have created a new element of code in replacement of the original one. In this case, the OriginalTargetElement property contains the original element of code, and the current property contains the replacement element of code.

Namespace:  PostSharp.Sdk.AspectInfrastructure
Assembly:  PostSharp.Compiler.Engine (in PostSharp.Compiler.Engine.dll) Version: 2023.0.3.0 (2023.0.3.0)
public MetadataDeclaration TargetElement { get; }

Property Value

Type: MetadataDeclaration
See Also