从配置安装

Castle 还可以通过 XML Registration 注册组件。

//To install from the app/web.config
container.Install(Configuration.FromAppConfig());

//To install from an xml file
Configuration.FromXmlFile("relative_path_to_file.xml");

阅读 Castle 的文档 它的用途