摘要:
Utility 文件夹下的 Guard 类是一个帮助类,该类只在 ObjectBuilder 项目内可见,主要执行一下验证工作。 1using System; 2using System.Collections.Generic; 3using System.Text; 4using System.Globalization; 5using System.Reflection; 6us... 阅读全文
摘要:
DependencyResolutionLocatorKey 用来唯一标识在 ObjectBuilder 中存储的对象。ObjectBuilder 中会使用一种叫做“定位器”的对象(内部通过一个哈希表来存储对象)来存储需要被缓存的对象。当我们要创建的是一个可以被重复使用的对象(例如:设计模式中的“单件模式”),则应该第一次使用 ObjectBuilder 创建该对象后将其缓存,当下次再使用 Obj... 阅读全文
摘要:
Utility 文件夹下的 Guard 类是一个帮助类,该类只在 ObjectBuilder 项目内可见,主要执行一下验证工作。 1using System; 2using System.Collections.Generic; 3using System.Text; 4using System.Globalization; 5using System.Reflection; 6us... 阅读全文