Open sandboxFocus

Class MethodPointcut

Custom attribute that, when applied on an advice method, specifies the name of the method that will be invoked at build-time to return the set of elements of code to which the advice applies.

Inheritance
MethodPointcut
Namespace: PostSharp.Aspects.Advices
Assembly: PostSharp.dll
Syntax
public sealed class MethodPointcut : Pointcut
Remarks

This method should have the signature IEnumerable<AdviceTargetType> SelectCodeElements(AspectTargetType target) , where AspectTargetType is either object either a reflection type corresponding to the kind of targets of the aspect (for instance System.Type for a type-level aspect), and AdviceTargetType is either object either a reflection type of the kind of targets of the advice (for instance System.MethodInfo for a method-level advice).

Constructors

Name Description
MethodPointcut(string)

Initializes a new MethodPointcut.

Properties

Name Description
MethodName

Gets the name of the method returning the set of code elements.

See Also