protected override void ExecuteInTargetProcess(RemoteConnection connection) { var sender = CfrResourceBundleHandler.Wrap(this.sender); var e = new CfrGetLocalizedStringEventArgs(eventArgsId); sender.raise_GetLocalizedString(sender, e); }
internal static CfrResourceBundleHandler Wrap(IntPtr proxyId) { if(proxyId == IntPtr.Zero) return null; var weakCache = CfxRemoteCallContext.CurrentContext.connection.weakCache; lock(weakCache) { var cfrObj = (CfrResourceBundleHandler)weakCache.Get(proxyId); if(cfrObj == null) { cfrObj = new CfrResourceBundleHandler(proxyId); weakCache.Add(proxyId, cfrObj); } return cfrObj; } }
internal static CfrResourceBundleHandler Wrap(RemotePtr remotePtr) { if (remotePtr == RemotePtr.Zero) { return(null); } var weakCache = CfxRemoteCallContext.CurrentContext.connection.weakCache; lock (weakCache) { var cfrObj = (CfrResourceBundleHandler)weakCache.Get(remotePtr.ptr); if (cfrObj == null) { cfrObj = new CfrResourceBundleHandler(remotePtr); weakCache.Add(remotePtr.ptr, cfrObj); } return(cfrObj); } }
internal static CfrResourceBundleHandler Wrap(IntPtr proxyId) { if(proxyId == IntPtr.Zero) return null; var weakCache = CfxRemoteCallContext.CurrentContext.connection.weakCache; lock(weakCache) { var cfrObj = (CfrResourceBundleHandler)weakCache.Get(proxyId); if(cfrObj == null) { cfrObj = new CfrResourceBundleHandler(proxyId); weakCache.Add(proxyId, cfrObj); } return cfrObj; } }