Got it working.

I moved my custom IWindsorInstaller to the service layer (had to add a
reference to castle in the service layer)

I registered the custom installer component inside the castle xml
configuration.

At runtime, I loaded and resolved the custom installer (from the xml
file) and fed that to the containers install method.

Doing this I was able to execute the following line (which wasn't
working before)

AllTypes.FromAssembly(Assembly.GetExecutingAssembly()).BasedOn<IService>().WithService.FromInterface()

Hopefully this is not considered a misuse of the container.

Thanks
James

On Sun, Sep 26, 2010 at 1:00 PM, James <[email protected]> wrote:
> Hi,
>
> I’ve been trying to get auto registration to work on my work but I’ve
> run into a bit of a snag when it comes to breaking out my code into
> separate assemblies.
>
> I have 4 assemblies in a pretty straight forward setup:
> -Domain
> (Service Interfaces, domain model)
>
> -Framework
> (Service locator, Base service interface, interceptors, Windsor
> installer)
>
> -Services
> (Service Implementations, all services implement framework base
> service)
>
> -Console
> (Presentation, references domain and framework)
>
> This setup works fine when using XML configuration (since you specify
> the assembly for each component). However, this setup will not work
> with auto registration because you can only load one outside
> assembly.
>
> Is there any way I can use the fluent API to say something like “load
> interfaces from my domain assembly and register them with
> implementations from my service assembly?”.
>
>
> Here is the code I'm calling from the Framework layer, somehow I need
> to load the Service assembly:
>
> AllTypes.FromAssemblyNamed("Domain").BasedOn<Framework.IService>().WithService.FromInterface()
>
>
> Thanks
> James
>



-- 
James

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