Register IEnumerable<TSomething> in the container

4 views
Skip to first unread message

Vadimmer

unread,
Jun 19, 2009, 4:36:27 PM6/19/09
to Castle Project Users
I would like to register IEnumerable<TSomething> in a container and
then resolve it as IEnumerable<TSomething>.
At the moment Windsor prevents me from doing so as it considers
IEnumerable<TSomething> constructor argument is a parameter and not a
service. I perfectly see the root is in the GenericListConvertor. Is
there any way to turn it off for a particular registration?

P.S. As a workaround I had to introduce ISomethingSequence and
register the component implementing this contract.

Vadim Kantorov

unread,
Jun 20, 2009, 10:01:05 AM6/20/09
to Castle Project Users
I worked around this by adding a sub-dependency resolver wich resolves
IEnumerable<TSomething> from a container in the normal way (to do so I
was to pass the container into the constructor of the resolver).

Ayende Rahien

unread,
Jun 21, 2009, 11:00:10 PM6/21/09
to castle-pro...@googlegroups.com
Can you show the problematic code?
Reply all
Reply to author
Forward
0 new messages