從配置安裝

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 的文件 它的用途