PostSharp is the #1 pattern-aware extension to C# and VB. It allows developers to eradicate boilerplate by offloading repeating work from humans to machines. PostSharp contains ready-made implementations of the most common patterns and gives you the tools to build automation for your own patterns.
Developers usually think in terms of design patterns, but with conventional programming languages, they end up writing boilerplate code. PostSharp extends the C# and VB languages with a notion of pattern. The result: shorter, cleaner code that’s easier to write and understand, contains fewer defects and is less expensive to maintain.
This chapter explains how to install PostSharp on your development computer, how to deploy it to end-user machines, how to cope with build servers, how to deploy license keys, and how to configure PostSharp.
This chapter explains different mechanism to add existing aspects to source code.
This chapter explains how to apply logging to your entire codebase in a matter of minutes, and how to configure the logging aspects to your needs.
This chapter explains how to validate parameters, properties and fields with custom attributes.
This chapter explains how to automatically implement the INotifyPropertyChanged interface.
This chapter explains how to transform a plain C# event into a weak event and avoid memory leaks.
This chapter explains how to implement the Aggregatable pattern by annotating an object model with parent/child information, and how to implement a visitor. The Aggregatable pattern is the base of undo/redo patterns and threading models.
This chapter explains how to implement an undo/redo feature by making your model objects record their changes.
This chapter explains how to add caching to your code.
This chapter explains how to create your own aspects with PostSharp Aspect Framework.
This chapter explains how to automatically validate your code against guidelines and conventions using PostSharp Architecture Framework.
This chapter explains how to test and debug aspects.
This chapter covers: Executing Code Just After the Assembly is Loaded.
This is the complete API reference documentation.