Hey, Matt. Thanks for jumping in here.
You'll probably remember me from the comments on that StackOverflow question. I'm one of the two current Autofac owners.
I'd be curious what Alex (the other project owner) thinks, but I'm still pretty strongly of the mind that this sort of thing should either be rectified by some redesign/metadata/keyed service work or a manually created factory.
There's a lot to consider when you start passing parameters down more than one level.
For example, say you have a system where you have ClassA, ClassB, and ClassC.
public class ClassA
{
public ClassA(ClassB b, int aNumber) { /* */ }
}
public class ClassB
{
public ClassB(ClassC c) { /* */ }
}
public class ClassC
{
public ClassC(int cNumber)
}
If you let parameters pass sort of "globally" down the stack, then both the incarnations of ClassA AND ClassC would get the same number. Is that what the dev wants or not? How would they know? When debugging, where did that number come from? Is that something else that now needs to be configurable - parameter precedence order?
Then there's the notion of refactoring - what happens if you refactor ClassA to no longer need the int, but ClassC still does? Sounds OK, so you also refactor the factory delegate to no longer need that parameter (since it's two levels removed from what you're actually trying to resolve). Oh, wait, things are broken now because ClassC can no longer be resolved.
At first glance it sounds like something simple to want to add, but there are a lot of ramifications and a lot of ways people can shoot themselves in the foot.
If we did pull something like this in (and, again, I'm not sure that's a good idea), it'd be nice to add it in a similar way to how Ninject did it, where you mark a Parameter as "inherited" (or not) and have the resolution stack automatically deal with it internally in the standard parameter processing mechanism. We'd want to make sure the generated factory (Func<A, B>) behavior continued to work correctly and possibly integrated here somehow (not sure how). Delegate factories, like in your question, would need to be made to work. We'd have to consider the configuration around that integration because some folks would expect the default behavior (don't pass the params down) and others would want it, so figuring out at the generated factory level how to turn that on or off would be interesting. Anyway, all that would be done ideally without changing the public interface of low-level internals much since that can be a breaking change in interesting and unfortunate ways, particularly to people who have written more advanced extensions.
In any case, that's my two cents.
-T