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; } }
public void TestLoad() { var config = AopProxyConfig.Load(); Assert.IsNotNull(config); }