Short answer
You are trying to make a DI container (Castle Windsor) perform the composition function, but it is actually aimed at composing the object. It just gives you a lot of friction. I assume that you will get the same experience with other containers.
DI containers are designed around object-oriented concepts, in particular SOLID. They work great with these principles because they were designed with an innate understanding of things like constructor injection and automatic wiring.
There is nothing wrong with a more functional approach, but I have not yet seen a DI container built around a functional composition rather than an object composition.
Long answer
Using delegates as a general principle for DI tends to be problematic in statically typed languages (at least in .NET) for several reasons. Conceptually, there is nothing wrong with this approach, as a delegate can be seen as an anonymous role interface . However, it tends to become bulky due to the ambiguity of the type.
The most common approach that I usually see is to use BCL built-in delegates like Func<T> , Action<T> , etc. However, you may have many different consumers who rely on Func<string> , in which case things become ambiguous - just because the consumer requires Func<string> does not mean that they need to be delegated in the same role. Although it is mechanically possible to use DI with delegates, what happens is that delegates hide application roles . Roles disappear, leaving only the mechanics.
Then you could, as suggested by the OP, define user delegates for each role, as this delegate suggested:
public delegate IEnumerable<Product> DGetProducts();
However, if you take this route, nothing happens. For each role, a "delegate role" must be defined. Compare this to defining a similar interface, and it should be clear that the only save is a pair of angle brackets and an explicit method definition:
public interface IProductSource { IEnumerable<Product> GetProducts(); }
This is not too much overhead (if any).
You can also take a look at this discussion: http://thorstenlorenz.wordpress.com/2011/07/23/dependency-injection-is-dead-long-live-verbs/