protected override void ExecuteInTargetProcess(RemoteConnection connection) { var sender = CfrLoadHandler.Wrap(this.sender); var e = new CfrOnLoadingStateChangeEventArgs(eventArgsId); sender.raise_OnLoadingStateChange(sender, e); }
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); } }
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); } }
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; } }