RoBlog – Refactoring Reality

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

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();var foo = ServiceLocator.Current.GetInstance(); In order to try and make the changes in small incremental steps, my first plan was to […]