This is the online documentation for PostSharp 5.0.
Download PDF or CHM. Go to v4.3 or v5.0

MethodLevelAspect.CompileTimeValidate Method (MethodBase)

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: 5.0.33.0 (5.0.33.0)
Syntax
C#
public virtual bool CompileTimeValidate(
	MethodBase method
)

Parameters

method
Type: System.Reflection.MethodBase
Method to which the aspect has been applied

Return Value

Type: Boolean
true if the aspect was applied to an acceptable field, otherwise false.
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