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