public void RegisterFromXmlExample() { //get a container _container = new Castle.Windsor.WindsorContainer(); //have the api parse its pertinent section of the app config and load it using this _container.Install(Castle.Windsor.Installer.Configuration.FromAppConfig()); //the section of the app config would look something like this string sectionOfAppConfig = @" <configSections> <section name='castle' type='Castle.Windsor.Configuration.AppDomain.CastleSectionHandler, Castle.Windsor' /> </configSections> <castle> <components> <component id='myCastleId' service='IMyInterface' type='MyType' /> </components> </castle> "; }
public void RegistrationFromIWindsorInstaller() { //get a container _container = new Castle.Windsor.WindsorContainer(); //call the Install member passing in an instance of IWindsorInstaller _container.Install(new MyRegistration()); }