I'm currently using the RC3, but someone recently released a bundled built of Castle+NHibernate, so I might switch to that and thus would also get the benefit of the new fluent registration API.
On 22 Dez., 20:13, Jason Meckley <[email protected]> wrote: > The power of Binsor is convention over configuration. And the fluent > registry Component.For<>() with Windsor can take advantage of that as > well. > for example I use a generic mapper IMapper<Input, Output> : IMapper > {Output MapFrom(Input item); }. where IMapper is just a place holder. > I use > PickAll.Types.Of<IMapper>().From(assembly).WithSerivce.Select > (x=>x.GetInterfaces()[0]); > which selects the IMapper<,> instead of IMapper interface. > Another convention is placing all types to be registered in a specific > namespace and just select those types for registry. > if you get into the situation where you are loading and decorating > multiple services then I wire them by hand. > > On Dec 22, 4:51 am, Henning <[email protected]> wrote: > > > Hi, > > > how are you registering your components? Currently I'm adding my > > components in the code, using the AddComponent-Method (using the RC3 > > Version). > > > But with growing projects this is getting kinda painful - I heard > > about binsor and stuff, but I haven't really gotten a good way at that > > so far. > > > Basically I'm wondering how are you identifying what should be added > > and with what interfaces. Are you looking for a certain naming > > convention oder classes that implement a certain interface? I tried a > > naive example by reflecting the interfaces a class implements, but I > > soon figured that I would end up with such a scenario: > > > interface IFooBase<T> {} > > > interface IFoo: IFooBase<int> {} > > > class Foo: IFoo {} > > > So I would like to register all instances of IFooBase, maybe with both > > interfaces IFoo and IFoo<int> ... > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
