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. ...

Get AOP in .NET now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.