You can also use
container.Register(AllTypes.Pick().From("assembly").Select(predicate<type>).With.FirstInterface());
if you have a very simple registration.
On Sep 3, 2:56 am, "Ken Egozi" <[EMAIL PROTECTED]> wrote:
> you only need Castle.MicroKernel and Castle.Windsor
> of course, you'd need a rather new-ish version, and not the RC3.
>
> as for dependencies, you just need to make sure that all dependencies are
> registered.
>
> ecample:
> interface IA { ... }
> interface IB { ... }
> class A : IA { ...}
> class B : IB
> {
> public B(IA a) { ... }
>
> }
>
> so B impl is dependant on IA service.
>
> You only need to register an impl for service IA, then if you'd add B to the
> container, it'd be smart enough to figure everything out.
>
> container.Register(
> Component.For<IA>().ImplementedBy<A>(),
> Component.For<IB>().ImplementedBy<B>()
> );
>
> var impl = container.Resolve<IB>();
>
> On Wed, Sep 3, 2008 at 12:46 AM, Mathetes <[EMAIL PROTECTED]> wrote:
>
> > I can't seem to figure out which .dll to add as references to my
> > project to use the fluent interface. Anyone? Also, can someone point
> > me to an example of using this fluent interface to register components
> > that have dependencies themselves?
>
> > Many Thanks
>
> --
> Ken
> Egozi.http://www.kenegozi.com/bloghttp://www.musicglue.comhttp://www.castleproject.orghttp://www.gotfriends.co.il
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---