コード例 #1
0
ファイル: AopProxyFactory.cs プロジェクト: xzoth/AopProxy.Net
        private AopProxyFactory()
        {
            Config = AopProxyConfig.Load();
            if (Config == null)
            {
                Config = new AopProxyConfig();
            }

            TypeMap = new Dictionary <Type, IAdvice>();
            foreach (var advConfig in Config.Advisors)
            {
                Type    pointCutType = AopProxyFactory.LoadType(advConfig.PointCutType);
                Type    adviceType   = AopProxyFactory.LoadType(advConfig.AdviseType);
                IAdvice advice       = Activator.CreateInstance(adviceType) as IAdvice;

                TypeMap[pointCutType] = advice;
            }
        }
コード例 #2
0
        public void TestLoad()
        {
            var config = AopProxyConfig.Load();

            Assert.IsNotNull(config);
        }