views:

26

answers:

1

Hi,

I'd like to hold my components in a separate xml file for production, development etc etc. Can this be done with Castle Windsor?

When using spring.net, i can use

<springDestinations>
      <objects xmlns="http://www.springframework.net"&gt;
        <import resource="file://~/Config/blablabla.xml"/>
      </objects>
    </springDestinations>

Using Castle Windsor, i have the following components

<components>
  <component id="Retriever" service="Model.Services.Remote.IRetriever, Model" type="Model.Services.Remote.Retriever, Model">
    <parameters>
      <resourceUrl>http://localhost:8888/Service.svc/&lt;/resourceUrl&gt;          
    </parameters>
  </component>
</components>

Thanks :-)

+2  A: 

Yes, you can use <include> elements and conditional registration in your XML configuration.

Mauricio Scheffer
Exellent, thank you for your help.
Gilbert