public PropertyEventArgs(VirtualProxyInvoker invoke) { if (invoke == null) { throw new ArgumentNullException("invoke"); } this.invoke = invoke; }
public static object Handle(object obj, string moduleid, int typeid, int methodid, object[] s) { if (VirtualProxyHooker.ProcessInvoke != null) { Module m = ResolveModule(moduleid); VirtualProxyInvoker invoke = new VirtualProxyInvoker(obj, m, _types[string.Format("{0}.{1}", moduleid, typeid)] , _methods[string.Format("{0}.{1}", moduleid, methodid)], s); VirtualProxyHooker.ProcessInvoke(invoke); return(invoke.ResultValue); } return(null); }
private static void ProcessInvoke(VirtualProxyInvoker invoke) { PropertyHooker hooker = null; lock (_syncobj) { hooker = Get(invoke.DeclaringType); } if (hooker != null) { hooker.Handle(invoke); } }
private void Handle(VirtualProxyInvoker invoke) { lock (this) { this.RemoveHook(); { PropertyEventArgs property = new PropertyEventArgs(invoke); if (this.Handling != null) { this.Handling(this, property); } } this.AddHook(); } }