I committed a fix.

Not too sure about my changes to FromInterface, perhaps Craig can verify I didn't break it. Anyway - tests do pass (including the one I added for the new scenario) so this seems to be working.

As a workaround John for v2.1, I think you'll need to add

.ConfigureFor<ProblematicClass>(c=>c.Forward(typeof(IFoo<B>), typeof(IFoo<A>)));

to explicitly add the other closed version of the interface (you have to add both, since you never know which one would be picked as "first")...

On 30/06/2010 4:32 PM, John Simons wrote:
Ooops sent too early!

But if one of my implementations is something like:
public class MembersFetcher : IFetchingStrategy<string,
MembersOfListViewModel>,  IFetchingStrategy<string,
MembersListViewModel>
{

}

Windsor is not registering both interfaces, it only registers the
first one.
How do I tell Windsor to register both?

Cheers
John

On Jun 30, 4:28 pm, John Simons<johnsimons...@yahoo.com.au>  wrote:
I'm currently registering all my Fetching strategies like this:

foreach (var assembly in assemblies){   container.Register(AllTypes

            .FromAssemblyNamed(Path.GetFileNameWithoutExtension(assembly))
            .BasedOn(typeof(IFetchingStrategy<>)).WithService.Base()
            .BasedOn(typeof(IFetchingStrategy<,>)).WithService.Base()
            .Configure(registration =>  registration.LifeStyle.Transient));

}

--
You received this message because you are subscribed to the Google Groups "Castle 
Project Users" group.
To post to this group, send email to castle-project-us...@googlegroups.com.
To unsubscribe from this group, send email to 
castle-project-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en.

Reply via email to