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); }
/// <summary> /// 建立物件注射器 /// </summary> public ObjectHookInjector() { Interceptor = new PropertyHookInterceptor <T>(); }