simplified my registration to:
container.Register(AllTypes.FromAssemblyContaining<IPresenterBase>().BasedOn<IPresenterBase>().Configure(...));

since i don't need to call Resolve<IHandler..> just ResolveAll, and
ResolveAll looks for the interfaces in the implementations (not in the
service type as I thought)


2010/11/22 José F. Romaniello <[email protected]>

> There was another mistake on my registration.
>
> every call to WithService.****().. needs a call to .Configure. In my
> previos registration command, the .Configure was working only for the last
> call to WithService.Self().
>
> Is this true? if this is the case i'm willing to add a little note to this
> page:
>
> http://stw.castleproject.org/Windsor.Registering-components-by-conventions.ashx?HL=withservice
>
>
> thank you
>
> 2010/11/22 José F. Romaniello <[email protected]>
>
> bah! i think i solved by using a where...
>>
>> container.Register(AllTypes.FromAssemblyContaining<IPresenterBase>()
>>  .Where(t => !t.IsAbstract && !t.IsInterface) <<-- added
>> .BasedOn(typeof(IHandler<>)).WithService.Base()
>>     .WithService.Self()
>> .BasedOn<IPresenterBase>().WithService.Self()
>> .Configure(c => c.LifeStyle.Transient.OnCreate(InitializePresenter)));
>>
>
>

-- 
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