摘要: Dino Esposito 在上个月的专栏中,我简要介绍了 Unity 2.0 依赖关系注入容器使用的拦截机制。 在演示面向方面的编程 (AOP) 的核心概念之后,我介绍了一个具体的拦截示例,可能符合如今的很多开发人员的需要。 您是否想要扩展现有代码的行为却不想以任何方式触及源代码? 您是否希望围绕现有的代码再运行更多代码? AOP 的目标是提供一种方法,将核心代码与其他干扰核心业务逻辑的内容隔离开。 Unity 2.0 提供基于 Microsoft .NET Framework 4 的框架来实现此目的,而且极其快速和方便。 为了使您完全理解这篇后续文章的目的,我先概要介绍上个月的内容。 您. 阅读全文
posted @ 2011-11-19 13:35 umlchina 阅读(661) 评论(1) 推荐(0) 编辑
摘要: Interception and Interceptors in C# (Aspect oriented programming)by Ioannis 16. January 2011 10:38 In this post, we see how to define specific actions to be executed before or after the execution of every call to a method in our code. This is also known as “intercepting” the execution of a method an 阅读全文
posted @ 2011-11-19 12:27 umlchina 阅读(931) 评论(2) 推荐(0) 编辑