I just saw Ayende's post today about PostSharp. I downloaded the code and tried it out, and I thought it was the coolest, most easy to use way to handle AOP that I've seen.
In his post, Ayende says that PostSharp accomplishes it's magic via IL Weaving. Now, at some abstract level I can deduce what that means, but I wanted to see if there was a more detailed answer out there. Unfortunately, for the first time in a very long time, Google came up empty for me. And so I thought this would be a great question for StackOverflow (since I've been a subscribe to Jeff's blog for a couple years now and knew this site was doing its thing).
So what exactly is IL Weaving and how is it accomplished?
Weaving refers to the process of injecting functionality into an existing program. This can be done conceptually at a number of levels:
In theory you could go one deeper and weave with an executable compiled to native instructions, but this would add a lot of complexity and I'm not aware of anything that does this.