PostSharp 2.0 Makes Aspect-Oriented Programming Easier with IDE Support
- Share
-
- |
Read later
Reading List

A note to our readers: You asked so we have developed a set of features that allow you to reduce the noise: you can get email and web notifications for topics you are interested in. Learn more about our new features.
AOP, or Aspect-Oriented Programming, allows developers to apply repetitive functionality to multiple classes without actually changing the source code for those classes. Instead, aspects or concerns are applied to classes indicated via attributes or configuration files. AOP first become widely popular with AspectJ and the Java programming language. Since then it has become available in most programming languages.
For .NET, AOP frameworks like PostSharp are implemented as a post-build process. This process decompiles the IL assembly, adds the additional functionality, and then recompiles it.To see the results, you then have to open it back up with a tool like Reflector.
PostSharp 2.0 adds two key features to makes it easier for AOP developers to understand their code. The first is an Aspect Browser. This allows developers to select an aspect and see all of the classes it applies to. This is done via a pair of tree views that resemble Visual Studio’s class viewer.
The second feature affects Visual Studios code editor. By hovering the mouse pointer over a class name, you can see all of the aspects that apply to it, even if it was applied to a base class. In addition, the tooltip that shows this information has links to take you to the definition of the aspect.
Rate this Article
- Editor Review
- Chief Editor Action
Hello stranger!
You need to Register an InfoQ account or Login or login to post comments. But there's so much more behind being registered.Get the most out of the InfoQ experience.
Tell us what you think
PostSharp vs Others
by
rafal buch
Re: PostSharp vs Others
by
David Clarke
Re: PostSharp vs Others
by
ARASH GHOREYSHI