PostSharp SDK 6.10 / / Class Reference / Post­Sharp.​Sdk.​Aspect­Weaver Namespace / Pointcut­Aware­Advice­Group Class / Pointcut­Aware­Advice­Group Methods / Pointcut­Aware­Advice­Group.​Validate­Target Method

PointcutAwareAdviceGroup.ValidateTarget Method

Validates the element of code to which an advice has been applied.

Namespace:  PostSharp.Sdk.AspectWeaver
Assembly:  PostSharp.Compiler.Engine (in PostSharp.Compiler.Engine.dll) Version: 6.10.14.0 (6.10.14.0)
Syntax
C#
protected virtual bool ValidateTarget(
	AspectWeaverInstance aspectWeaverInstance,
	MetadataDeclaration target,
	MulticastTargets acceptableTargets,
	MulticastAttributes acceptableTargetAttributes
)

Parameters

aspectWeaverInstance
Type: PostSharp.Sdk.AspectWeaver.AspectWeaverInstance
Information about the context in which the advice is being used.
target
Type: PostSharp.Sdk.CodeModel.MetadataDeclaration
Element of code to which the advice has been applied.
acceptableTargets
Type: MulticastTargets
Kinds of elements of code that are considered valid.
acceptableTargetAttributes
Type: MulticastAttributes
Attributes of elements of code that are considered valid.

Return Value

Type: Boolean
true if target is a valid target for the current advice group, otherwise false.
See Also