NullReferenceException when using InjectionFactory to register type

When using InjectionFactory to register a type the FromType property for the RegisterEventArgs will be null. This causes a NullReferenceException to be thrown. I've added a test to demonstrate the issue. If I can figure out the problem and get all tests to pass I'll submit a pull request for that as well. But I just thought you'd like to have the test anyway.