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 9. Aspect composition: example and execution

This chapter covers

  • The ordering of aspects being applied to the same code
  • Using aspect roles in PostSharp to specify order/dependency
  • Composing the order of interception aspects with DynamicProxy
  • Real-world example of composing caching and authorization aspects

As you continue to use AOP, you’ll want to apply multiple aspects to the same pieces of code, and this chapter covers how to compose aspects together in a predictable way. If you’re new to AOP, it’s best to start small until you get the hang of it. Introduce a simple aspect (like logging) to your project and see how it goes. For me, it went well, so I wanted to start creating more aspects to handle more cross-cutting concerns. ...

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