philzhou

导航

2011年3月7日 #

A Singleton Service Locator Pattern(转)

摘要: 原文 This is the third post of a series on the Service Locator pattern. In the first post I described how to create a basic service locator for your C# application, while in the second post I introduced lazy initialization of the services. We now add another piece to our puzzle, transforming the Servi 阅读全文

posted @ 2011-03-07 15:27 philzhou 阅读(383) 评论(0) 推荐(0) 编辑

Service Locator Pattern in C# with Lazy Initialization(转)

摘要: 原文 In my previous post Service Locator Pattern in C#: A Simple Example I introduced a fairly basic implementation of this pattern. In this post I will address one of the limitations of that implementation, introducing a form of lazy initialization. Defining Lazy InitializationLazy initialization imp 阅读全文

posted @ 2011-03-07 15:18 philzhou 阅读(570) 评论(0) 推荐(0) 编辑

Service Locator Pattern in C#: A Simple Example(转)

摘要: 原文 A Service Locator is a common design pattern that allows decoupling clients of services (described by a public interface) from the concrete class implementing those services. Martin Fowler has a gr... 阅读全文

posted @ 2011-03-07 14:53 philzhou 阅读(927) 评论(0) 推荐(0) 编辑