I’m moving to using the SimpleIoc for Dependency Injection from using a Static class. There is a Register<TClass>(Func<TClass> factory) where TClass : class method in the SimpleIoc, but I can’t find any examples of using it. Here’s a link to the source code.
Am I approaching this correctly, or does DI always need to create it at register time? Is this the method I should use to register the class? Can you give me an example on how to do this?
This is the Silverlight code I’m trying to update.
EDIT: moved my approach to an answer
I moved my example from my question to an answer, since no one else has answered it in 22 days. EDIT: this is better.