Exemple #1
0
        public PropertyHookInterceptor <T> UseFor(T targetObject)
        {
            var result = new PropertyHookInterceptor <T>();

            result.TargetObject = targetObject;
            result.PropertyBeforeCallbackDict = this.PropertyBeforeCallbackDict.ToDictionary(x => x.Key, x => x.Value);
            result.PropertyAfterCallbackDict  = this.PropertyAfterCallbackDict.ToDictionary(x => x.Key, x => x.Value);

            return(result);
        }
Exemple #2
0
 /// <summary>
 /// 建立物件注射器
 /// </summary>
 public ObjectHookInjector()
 {
     Interceptor = new PropertyHookInterceptor <T>();
 }