PostSharp6.6//API Reference/Post­Sharp.​Constraints Namespace/IReferential­Constraint Interface

IReferentialConstraint Interface

A referential constraint is a piece validation logic executed at build time. Referential constraints are applied to elements of code ((Assembly, Type, MethodInfo, ConstructorInfo, PropertyInfo, EventInfo, FieldInfo, ParameterInfo), typically using custom attributes or MulticastAttribute, and verified at build time for every assembly using this element of code. This is a difference to scalar constraints, which are only verified for the assembly where that element of code is defined.

Namespace:  PostSharp.Constraints
Assembly:  PostSharp (in PostSharp.dll) Version: 6.6.14.0 (6.6.14.0)
Syntax
C#
public interface IReferentialConstraint : IConstraint

The IReferentialConstraint type exposes the following members.

Methods
  NameDescription
Public methodValidateCode
Validates the constraint.
Public methodValidateConstraint
Validates the fact that the constraint has been applied on a valid element of code. When this method returns false, the constraint is silently ignored.
(Inherited from IConstraint.)
Remarks
See Also