PostSharp.ILAPI ReferencePost­Sharp.​AspectsType­Level­AspectCompile­Time­Validate
Open sandboxFocus

TypeLevelAspect.CompileTimeValidate Method

CompileTimeValidate(Type)

Method invoked at build time to ensure that the aspect has been applied to the right target.

Declaration
public virtual bool CompileTimeValidate(Type type)
Parameters
Type Name Description
Type type

Type to which the aspect has been applied

Returns
Type Description
System.Boolean

true if the aspect was applied to an acceptable field, otherwise false.

CompileTimeValidate(Object)

Method invoked at build time to ensure that the aspect has been applied to the right target.

Declaration
public sealed override bool CompileTimeValidate(object target)
Parameters
Type Name Description
Object target

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

Returns
Type Description
System.Boolean

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

Overrides
Aspect.CompileTimeValidate(Object)
Implements
IValidableAnnotation.CompileTimeValidate(Object)