代码改变世界

a xml configuration for unity and interception

2011-11-29 09:55  无名365  阅读(185)  评论(0编辑  收藏  举报

<configuration>
  <configSections>
    <section name="unity" type="Microsoft.Practices.Unity.Configuration.UnityConfigurationSection, Microsoft.Practices.Unity.Configuration, Version=2.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
 </configSections>
<unity xmlns="http://schemas.microsoft.com/practices/2010/unity">
  <sectionExtension type="Microsoft.Practices.Unity.InterceptionExtension.Configuration.InterceptionConfigurationExtension,
                    Microsoft.Practices.Unity.Interception.Configuration" />
  <alias alias="IOutput" type="AOPUnityTest.IOutput, AOPUnityTest" />
  <alias alias="OutputImp" type="AOPUnityTest.OutputImp, AOPUnityTest" />
  <alias alias="MyHandler" type="AOPUnityTest.MyHandler, AOPUnityTest" />
 
  <container>
    <extension type="Interception" />
    <register type="IOutput" mapTo="OutputImp" name="">
   <interceptor type="TransparentProxyInterceptor" />
      <policyInjection />
    </register>
  </container>
</unity>
</configuration>