A constraint is a piece of validation logic executed at build time. Constraints are applied to elements of code (Assembly, Type, MethodInfo, ConstructorInfo, PropertyInfo, EventInfo, FieldInfo, ParameterInfo), typically (but not necessarily) using custom attributes or MulticastAttribute.
Namespace: PostSharp.Constraints
Assembly: PostSharp.dll
Syntax
[RequirePostSharp(null, "ArchitectureConstraint")]
public interface IConstraintMethods
| Name | Description |
|---|---|
| ValidateConstraint(object) | Validates that the constraint has been applied to a valid element of code. When this
method returns |