This is the online documentation for PostSharp 5.0.
Download PDF or CHM. Go to v4.3 or v5.0

Validating Architecture

Besides aspect-oriented programming, you can use PostSharp to validate your source code against architecture and design rules named constraints. Constraints are piece of codes that validate the code against specific rules at build time.

PostSharp provides ready-made constraints for the following scenarios:

Additionally, you can develop custom constraints to enforce your own design rules. For details, see Developing Custom Architectural Constraints.