PostSharp 6.4 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Constraints Namespace / IReferential­Constraint Interface

IReferentialConstraint Interface

A constraint is a piece validation logic executed at build time. 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.

Namespace:  PostSharp.Constraints
Assembly:  PostSharp (in PostSharp.dll) Version: (
public interface IReferentialConstraint : IConstraint

The IReferentialConstraint type exposes the following members.

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.)
See Also