想不到2年前MSDN上就有用ContextBoundObject来实现AOP的文章.

Aspect-Oriented Programming Enables Better Code Encapsulation and Reuse

但是为什么现在网络上基于ContextBoundObject的AOP.NET框架不多呢?

也许是很多致力于AOP的人都希望用机器码的角度去做这件事.目的当然是性能.

不过按我的理解,ServicedComponent就是实实在在的ContextBoundObject实现的AOP的样板.

详细可以看 ServicedComponentProxy 的实现.

ConextBoundModel