PostSharp4.3//API Reference/Post­Sharp.​Aspects.​Advices Namespace/Method­Pointcut Class
MethodPointcut Class
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 Hierarchy
System.Object
  System.Attribute
    PostSharp.Aspects.Advices.Pointcut
      PostSharp.Aspects.Advices.MethodPointcut

Namespace: PostSharp.Aspects.Advices
Assembly: PostSharp (in PostSharp.dll) Version: 4.3.48.0 (4.3.48.0)
Syntax
C#
public sealed class MethodPointcut : Pointcut

The MethodPointcut type exposes the following members.

Constructors
  NameDescription
Public methodMethodPointcut
Initializes a new MethodPointcut.
Properties
  NameDescription
Public propertyMethodName
Gets the name of the method returning the set of code elements.
Extension Methods
  NameDescription
Public Extension MethodQueryInterface<T>
Gets the implementation of a specified interface for the specified object.
(Defined by QueryInterfaceExtensions.)
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).

See Also