EnterpriseLibrary 6.0 AOP 使用问题

因为EnterPrise Library 6.0改动了模块的功能类不再自动从Unity创建了,也就是引导也不依赖Unity容器组件,需要先使用静态方法注册一下

 private static void RegisterPIAB()
        {
            IConfigurationSource configurationSource = ConfigurationSourceFactory.Create();
            PolicyInjector policyInjector = new PolicyInjector(configurationSource);
            PolicyInjection.SetPolicyInjector(policyInjector);
        }

 

 

https://www.cnblogs.com/landeanfen/p/4782370.html

https://blog.csdn.net/h394600493/article/details/46985835

posted @ 2018-04-25 10:55  _IT小野人  阅读(134)  评论(0编辑  收藏  举报