I\'m trying to figure out the correct way to inject an auto-factory which takes params, or even if this is possible with Unity.
For example I know I can do this:
The answer by @TheCodeKing works fine, but in most (possibly all?) cases could be shortened to the following:
Container.RegisterInstance>(name => new Log(name));
(note that I'm using RegisterInstance() instead of RegisterType())
Since the Func<> implementation is already a kind of factory there's usually no need to wrap it in a InjectionFactory. It only ensures that each resolution of the Func is a new instance, and I can't really think of a scenario that requires this.