I would like to use "strategy pattern" with 2 Web projects, my configuration file (and only with configuration file) :
<?xml version="1.0"?>
<configuration>
<components>
<!-- container ORM -->
<component id="DALReseauContainer" type="ReseauRules.Db.BLL.DbReseauWorkingContextContainer, ReseauRules" service="ReseauConnector.BLL.IReseauWorkingContextContainer, ReseauConnector">
</component>
<!-- remote controler (Web Service) -->
<component id="remoteReseauManager"
type="ReseauConnector.BLL.RemoteReseauManager, ReseauConnector"
service="ReseauConnector.BLL.IReseauManager, ReseauConnector"
lifestyle="transient">
</component>
<!-- local controler -->
<component id="localReseauManager"
type="ReseauRules.Db.BLL.DbReseauManager, ReseauRules"
service="ReseauConnector.BLL.IReseauManager, ReseauConnector"
lifestyle="transient">
<parameters>
<container>${DALReseauContainer}</container>
</parameters>
</component>
</components>
</configuration>
project A uses "remoteReseauManager" and references only ReseauConnector, can call
container.Resolve<IReseauManager>("remoteReseauManager");
project B uses "localReseauManager" and references ReseauConnector AND ReseauRules, can call
container.Resolve<IReseauManager>("localReseauManager");
when I call
IWindsorContainer container = new WindsorContainer(new Castle.Windsor.Configuration.Interpreters.XmlInterpreter());
Windsor tries to resolve each components, and as in project A,ReseauRules does not exist, Windsor can't load ReseauRules (as expected).
How to tell to Windsor do not load a component in this context (configuration file) ?
Thanks a lot.