FieldLevelAspect.CompileTimeValidate Method (FieldInfo) |
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: 2023.0.3.0 (2023.0.3.0)
C#
public virtual bool CompileTimeValidate( FieldInfo field )
Parameters
- field
- Type: System.Reflection.FieldInfo
Field to which the aspect has been applied
Return Value
Type: Booleantrue if the aspect was applied to an acceptable field, otherwise false.
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.