PostSharp Features
- Get more productive in minutes with ready-made pattern implementations.
- Automate more complex patterns and remove more boilerplate code.
- Maintain your existing codebase in C# or Visual Basic.
- Benefit from much better run-time performance.
Get more productive in minutes with ready-made pattern implementations
- Logging - Adds comprehensive logging in a few clicks without impacting on your source code. Supports most popular back-ends, including log4net, NLog, Enterprise Library, System Console, System Diagnostics. You can trace everything you need in minutes without cluttering your code.
Maintain your existing codebase in C# and VB
- Existing Code Base - PostSharp respects your technology assets and will work incrementally with your existing code base. There is no need for a full rewrite or redesign.
- Design Neutrality - PostSharp takes minimal assumptions on your code. It does not force you to adopt any specific architecture or threading model. You can add aspects to anything, not just interface/virtual methods. Plus, it is fully orthogonal from dependency injection. You don’t have to dissect your application into components and interfaces in order to use PostSharp.
- Plain C# and VB - PostSharp provides advanced features present in F#, Scala, Nemerle, Python, Ruby or JavaScript, but your code is still 100% C# and VB, and it is still compiled by the proved Microsoft compilers.
- Cross-platform - Supports the .NET Framework, Windows Phone, WinRT and Portable Class Libraries.
Automate more complex patterns and remove more boilerplate code
- PostSharp Aspect Framework - A robust and exhaustive implementation of aspect-oriented programming for .NET. Includes a powerful toolset to automate your own patterns.
- Choice of Possible Transformations - Includes decoration of methods, iterators and async state machines, interception of methods, events or properties, introduction of interfaces, methods, events, properties, custom attributes or resources, and more.
- Dynamic Aspect/Advice Providers - Automatically add aspects to code according to rules written programmatically in C# or VB so your codebase is not cluttered with custom attributes.
- Aspect Inheritance - Apply an aspect to a base class and have it automatically applied to all derived classes. Ensures that all derived classes using this aspect's logic is correct.
Benefit from much better run-time performance
- Run-time Performance - Start-up latency, execution speed and memory consumption matter. Whether you’re building a mobile app or a back-end server, PostSharp delivers exceptional run-time performance.
- Build-time Code Generation - Unlike proxy-based solutions, PostSharp modifies your code at build time. It also allows for much more powerful enhancements that produces dramatically faster applications.
- No Reflection - PostSharp does not rely on reflection at run-time. The only code that is executed is what you can see with a decompiler.
- Build-time Initialization - Many patterns make decisions based on the shape of the code which they are applied. With PostSharp, you can analyze the target code at build-time and store the decisions into serializable fields. At runtime, the aspects will be deserialized and you won’t need to analyze the code at run-time using reflection.