MethodLevelAspect.CompileTimeValidate Method (Object)
Method invoked at build time to ensure that the aspect has been applied to the right target.

Namespace: PostSharp.Aspects
Assembly: PostSharp (in PostSharp.dll) Version: 4.3.31.0 (4.3.31.0)
Syntax
C#
public override sealed bool CompileTimeValidate(
	Object target
)

Parameters

target
Type: System.Object
Code element (Assembly, Type, FieldInfo, MethodBase, PropertyInfo, EventInfo, ParameterInfo, or LocationInfo) to which the aspect has been applied.

Return Value

Type: Boolean
true if the aspect was applied to an acceptable target, otherwise false.

Implements

IValidableAnnotation.CompileTimeValidate(Object)
Remarks
The implementation of this method is expected to emit an error message (see MessageSource) or an exception in case of error. Returning false without emitting an error message or exception causes the aspect to be silently ignored.
See Also