Build automation for your own patterns to reduce development effort and improve architecture.
Have a custom pattern in your code? With PostSharp you can build automation for any pattern you need using the same tooling we use.
- Amplify developer skills
- Build custom patterns
- Exceptional performance
When code no longer fits a single person's brain.
Teach the Compiler to Do More
Deliver more than guidelines – Patterns are usually described using implementation guidelines, and sometimes these guidelines are fully algorithmic with no decision left to the developer. That’s exactly what machines are good at, so why not offload that work to the compiler?
Achieve economies of scale – With PostSharp, you write an aspect once, saving time and reducing source code each and every time it is applied to your codebase.
Improve the Architecture
Encapsulate patterns – Objects are a great encapsulation tool but they struggle at addressing functionalities that repeat throughout the application. Aspects are the right way to encapsulate patterns that need to be applied over and over again.
Reduce complexity – Move complexity to aspects and write business logic at a higher level of abstraction.
Write cleaner code – Fewer lines of code means a smaller surface for defects to occur. Code that is easier to read and understand is easier to modify and produces fewer defects.
Encapsulate experience – Experienced developers will use their unique knowledge to build aspects that are specific to your codebase. Deployed to the rest of the team, these aspects will allow anyone to consistently add complex functionality with ease.
Apply easily – Once created aspects are very easy to apply and use. Developers who will only use the aspects don’t require additional PostSharp training.
Flexible by design
Rich building blocks – Aspects are not limited to working only with methods. Perform actions against event registrations, properties and other constructs.
Expressive combinations – Assemble the building blocks at compile time using the full power of C# and reflection.
Non-invasive – Add functionality where you want in your codebase without having to change any code.
Solid foundation – Custom aspects are built using the same infrastructure and code that the PostSharp built-in patterns are.
Compile time execution – Run aspect code during compilation and reduce the execution required at run-time.
No runtime reflection – Strong typing and compile time execution eliminate the need for you to write reflection code for run-time execution.