C# based simple service locator

I’ve always loved the Service locator pattern – why ? Because it requires so little maintenance, and it’s a very crucial point if you want somewhat automatic dependency injection.

As you can read in my blog post “Staying DRY: Mind those switch statements” a service locator can replace cumbersome multiple switch statements which require each one to be changed whenever a new case comes along.

Read More »

.Net Cache library

Caching library’et er egentlig bare en egen udviklet cache ala. den man kender fra HttpRuntime.Cache.

Dog med et par forskelle, bl.a. kræver den ikke System.Web namespacet og den er generic (så ikke noget med at typecaste hele tiden). Ellers er brugen meget den samme.

Read More »