Example #1
0
        protected override void ExecuteInTargetProcess(RemoteConnection connection)
        {
            var sender = CfrLoadHandler.Wrap(this.sender);
            var e      = new CfrOnLoadingStateChangeEventArgs(eventArgsId);

            sender.raise_OnLoadingStateChange(sender, e);
        }
Example #2
0
        internal static CfrLoadHandler Wrap(RemotePtr remotePtr)
        {
            if (remotePtr == RemotePtr.Zero)
            {
                return(null);
            }
            var weakCache = CfxRemoteCallContext.CurrentContext.connection.weakCache;

            lock (weakCache) {
                var cfrObj = (CfrLoadHandler)weakCache.Get(remotePtr.ptr);
                if (cfrObj == null)
                {
                    cfrObj = new CfrLoadHandler(remotePtr);
                    weakCache.Add(remotePtr.ptr, cfrObj);
                }
                return(cfrObj);
            }
        }
Example #3
0
        internal static CfrLoadHandler Wrap(IntPtr proxyId)
        {
            if (proxyId == IntPtr.Zero)
            {
                return(null);
            }
            var weakCache = CfxRemoteCallContext.CurrentContext.connection.weakCache;

            lock (weakCache) {
                var cfrObj = (CfrLoadHandler)weakCache.Get(proxyId);
                if (cfrObj == null)
                {
                    cfrObj = new CfrLoadHandler(proxyId);
                    weakCache.Add(proxyId, cfrObj);
                }
                return(cfrObj);
            }
        }
Example #4
0
 internal static CfrLoadHandler Wrap(IntPtr proxyId)
 {
     if(proxyId == IntPtr.Zero) return null;
     var weakCache = CfxRemoteCallContext.CurrentContext.connection.weakCache;
     lock(weakCache) {
         var cfrObj = (CfrLoadHandler)weakCache.Get(proxyId);
         if(cfrObj == null) {
             cfrObj = new CfrLoadHandler(proxyId);
             weakCache.Add(proxyId, cfrObj);
         }
         return cfrObj;
     }
 }