PureAttribute.CompileTimeValidate Method |
Method invoked at build time to ensure that the aspect has been applied to
the right target.
Namespace: PostSharp.Patterns.Model
Assembly: PostSharp.Patterns.Model (in PostSharp.Patterns.Model.dll) Version: 2023.0.3.0 (2023.0.3.0)
C#
public bool CompileTimeValidate( Object target )
Parameters
- target
- Type: System.Object
Target element.
Return Value
Type: Booleantrue if the aspect was applied to an acceptable target, otherwise false.
Implements
IValidableAnnotation.CompileTimeValidate(Object)
The implementation of this method is expected to emit an error message
or an exception of type InvalidAnnotationException in case of error. Only returning false causes the aspect
to be silently ignored.