RoBlog – Refactoring Reality

Discrete thought packets on .Net, software development and the universe; transmitted by Rob Levine

Using log4net with Unity (part 2) – UnityLog4NetExtension now on NuGet

by Rob Levine on 21-Dec-2013

Following on from a previous post, the solution detailed has now been renamed to “UnityLog4NetExtension” and is now available as a NuGet package as well as via GitHub. So if you want to dependency inject the correct log4net ILog logger instance for your type, all you need to do is: 1) reference the NuGet package […]

Unity does not respect HierarchicalLifetimeManager when manually registering UnityServiceLocator with the container

by Rob Levine on 15-Mar-2013

I’ve been trying to phase out some usage of the static ServiceLocator pattern in our codebase. There are many reasons not to like this, which I won’t go into here: 1 var foo = ServiceLocator.Current.GetInstance(); In order to try and make the changes in small incremental steps, my first plan was to allow the IServiceLocator […]