O'Reilly logo

AOP in .NET: Practical Aspect-Oriented Programming by Matthew D. Groves, Foreword by Phil Haack

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 3. Call this instead: intercepting methods

This chapter covers

  • What method interception means
  • Using Castle DynamicProxy to intercept methods
  • Writing a data transaction aspect
  • Using PostSharp to intercept methods
  • Writing a threading aspect

In chapter one, I talked about join points and pointcuts. I left the definition of these terms fairly broad, defining a join point as any point in between your code and describing a pointcut as a collection of join points. I kept these definitions loose because aspects can theoretically be applied to any location in your code that you can describe. You could put an aspect inside of an if statement or use it to modify a for loop. But you don’t need to do that 99% of the time in practical application. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required