castle入门-cms修改

xiaoxiao2026-05-25  17

windsor = new WindsorContainer( new XmlInterpreter(new ConfigResource));

 

  在配置文件的<configSections>配置节里首先加入下面的配置,关于这点的作用在此就不多解释,详细可以看看我之前写的文章:

<configSections>  <!-- Specify the castle section handler -->  <section name="castle" type="Castle.Windsor.Configuration.AppDomain.CastleSectionHandler, Castle.Windsor"/>

  上面我门定义了castle配置节点,那castle的配置节点该怎么去配置呢,看看下面的配置代码:

 <castle>  <include uri="file://castle-dao.config"/> </castle>

在castle-dao.config文件中

   <configuration>

         <components>

            <component id="dao" service="dao" type="daoimpl">

         </components>

   </configuration>

相关资源:asp.net知识库
转载请注明原文地址: https://www.6miu.com/read-5049373.html

最新回复(0)