Implementing a basic IoC container using C#