Design Patterns : Adapter Pattern

There is already a large amount of literature on the Internet which discusses Adapter Pattern. However, the purpose of article is to showcase the implementations of the Adapter Pattern, rather than discussing the application of the pattern. In this post, adapter class is implemented using 1. Inheritance 2. Dependency Injection 3. Generics Consider your old … Continue reading Design Patterns : Adapter Pattern

Advertisements

Singleton using Lazy(T)

Singleton Design Pattern is probably the simplest and most straightforward design pattern. So instead of explaining further, let me get to the code. The whole idea behind the above implementation of Singleton is to make use of the Lazy(T) class provided by Framework 4.0 and provide a lazy initialized version of the pattern, in addition … Continue reading Singleton using Lazy(T)