[Don't worry about the formatting - Codeplex switched over to one of the web rich text editors a while back, but unfortunately sometime it doesn't render the editor, and you're stuck with a plain text box. Turns out you can just enter HTML.]
At this time, automatic factories don't support arguments. There's just too many ambiguities over what the signature needs to look like. For example, what if you want to create an object through the container that takes four parameters, but you want every
other one to come out of the container? An option would be to support the dependency overload objects you can pass to the Resolve method; I didn't do that because then we're coupled back to the Unity container code again, which I was trying to avoid in the
My recommendation for now is, if you need a factory method that doesn't match the signature you want, simply configure the container to supply it explicitly. Either that or create an explicit factory class and resolve that.
Your case would end up looking like this:
IUnityContainer container = new UnityContainer();
(string name) => new Foo(name));
once you do that, you can then resolve your ProcessModel and you'll get the delegate you want. If you actually had dependencies, you would use a closure to capture the container and get them that way.