I am used to have a separated assembly called GuyWire, with various implementations of IWindsorInstaller and the container bootstrapping. In order to have strongly typed registration, this assembly reference almost any assembly in the solution, but no one references to the guywire. The trick is very simple, have a a common interface named IGuyWire... , the guywire assembly has as output path the startup project... and the startup project does a load in runtime...
more details here: http://fabiomaulo.blogspot.com/2009/11/guywire.html <http://fabiomaulo.blogspot.com/2009/11/guywire.html> http://jfromaniello.blogspot.com/2009/11/chinook-media-manager-guywire.html <http://jfromaniello.blogspot.com/2009/11/chinook-media-manager-guywire.html> 2010/9/26 John Simons <[email protected]> > Regardless of the number of assemblies, I think it would be beneficial to > separate the assemblies registration(assemblies to scan) from the actual > component registration, thoughts? > > Cheers, John > > On 27/09/2010, at 7:49, Krzysztof Koźmic <[email protected]> > wrote: > > > 1. What real benefit do you have from that many assemblies? From what you > describe it looks like you need two: one for UI one for everything else. > > > > 2. See this: > http://stw.castleproject.org/Windsor.Registering-components-by-conventions.ashx#Selecting_service_for_the_component_16 > > > > if none of provided approaches suits you rethink your architecture or use > Select and provide your custom logic. > > > > HTH, > > Krzysztof > > > > > > > > > > > > On 27/09/2010 2:00 AM, James 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 > >> > > > > -- > > 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]<castle-project-users%[email protected]> > . > > For more options, visit this group at > http://groups.google.com/group/castle-project-users?hl=en. > > > > -- > 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]<castle-project-users%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/castle-project-users?hl=en. > > -- 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.
