Hi,

I'm struggling to fluently register some types by convention.

I have a generic interface IManager<T, TKey>  and I want to register
all the types that use this interface, however, these types do not
inherit the interface directly and have their own interfaces. i.e.

public interface IContactManager : IManager<Contact, Guid>,
IDisposable

and

public class ContactManager : ManagerBase<Contact, System.Guid>,
IContactManager

I've tries quite a few variations of

    container.Register(
 
AllTypes.FromAssemblyContaining<ContactManager>().BasedOn(typeof(IManager<,>)).WithService.FirstInterface()
                .Configure(c => c.LifeStyle.Singleton)
                );

but the following always fails

IContactManger contactManager = Kernel.Resolve<IContactManager>();

How would I go about achieving this?

Thanks,

Matt

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

Reply via email to