RoBlog – Refactoring Reality

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

Category Archives: .Net

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 […]

Using log4net with Unity

by Rob Levine on 28-Dec-2012

[EDIT: the Unity extension described here is now available as a NuGet package. See this post for more information] When using log4net, it is quite common to create loggers for each class using something like: 1 2 3 4 public class MyClass { private static readonly ILog logger = LogManager.GetLogger(typeof(MyClass)); } I’ve been following this pattern for […]

ConfigGen – .NET Configuration File Generator

by Rob Levine on 30-Jun-2010

After a week and a half off work and on holiday, which consisted of me working solidly on my new pet project, I am pleased to announce the first (alpha) release of ConfigGen – .NET Configuration File Generator. ConfigGen is a .Net configuration file generation tool, and it is intended to make the .Net developer’s […]

Refix – .NET dependency management tool

by Rob Levine on 14-Jun-2010

Just a short blog entry to highlight an exceptionally cool project that a colleague of mine has been working on in his spare time: Refix. A .NET dependency management tool. This tool attacks the problem of having a project with dependencies, where these dependencies themselves may have common, but different version, assemblies. I’ve certainly had […]