views:

698

answers:

1

I have an interface declared as

IRetrievable<T, idT>

where T is the retrieved type and IdT is the argument passed.

How do I configure the castle windsor IoC container to resolve that to a specfic Implementation. Such as a class defined as

FooRetriever : IRetrievable<Foo, string>

I found an example that showed how to resolve a single argument generic:

<component id="FooRetriever" service="Namespace.IRetrievable'1[[Namespace.Foo, Assembly]], Assembly" type="Namespace.FooRetriever, Assembly" />

However I can't figure out how to to accept 2 generic arguments (T, idT) instead of just one.

+8  A: 
<component id="FooRetriever" service="Namespace.IRetrievable`2[[Namespace.Foo, Assembly],[System.String]], Assembly" type="Namespace.FooRetriever, Assembly" />
gcores
That did it. Thanks!
ebrown