Esempio n. 1
0
 public PropertyEventArgs(VirtualProxyInvoker invoke)
 {
     if (invoke == null)
     {
         throw new ArgumentNullException("invoke");
     }
     this.invoke = invoke;
 }
Esempio n. 2
0
 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);
 }
Esempio n. 3
0
        private static void ProcessInvoke(VirtualProxyInvoker invoke)
        {
            PropertyHooker hooker = null;

            lock (_syncobj)
            {
                hooker = Get(invoke.DeclaringType);
            }
            if (hooker != null)
            {
                hooker.Handle(invoke);
            }
        }
Esempio n. 4
0
 private void Handle(VirtualProxyInvoker invoke)
 {
     lock (this)
     {
         this.RemoveHook();
         {
             PropertyEventArgs property = new PropertyEventArgs(invoke);
             if (this.Handling != null)
             {
                 this.Handling(this, property);
             }
         }
         this.AddHook();
     }
 }