Implementation of IReferentialConstraint based on MulticastAttribute.
Inheritance
ReferentialConstraint
Namespace: PostSharp.Constraints
Assembly: PostSharp.dll
Syntax
public abstract class ReferentialConstraint : Constraint, IReferentialConstraint, IConstraintRemarks
A referential constraint validates how a declaration is used. It is validated when the assembly that contains
the target declaration is processed and, if the target declaration is public, when each assembly that references
it is processed by PostSharp. The assembly parameter of ValidateCode(object, Assembly) is the assembly being processed.
Use ReflectionSearch to find the references to the target declaration, and Message to emit warnings or errors. To validate the declaration itself, use ScalarConstraint instead.
Constructors
| Name | Description |
|---|---|
| ReferentialConstraint() |
Methods
| Name | Description |
|---|---|
| ValidateCode(object, Assembly) | Validates the constraint. |