Exemplo n.º 1
0
        internal static CfrDomDocument Wrap(IntPtr proxyId)
        {
            if (proxyId == IntPtr.Zero)
            {
                return(null);
            }
            var weakCache = CfxRemoteCallContext.CurrentContext.connection.weakCache;

            lock (weakCache) {
                var cfrObj = (CfrDomDocument)weakCache.Get(proxyId);
                if (cfrObj == null)
                {
                    cfrObj = new CfrDomDocument(proxyId);
                    weakCache.Add(proxyId, cfrObj);
                }
                return(cfrObj);
            }
        }
Exemplo n.º 2
0
        internal static CfrDomDocument Wrap(RemotePtr remotePtr)
        {
            if (remotePtr == RemotePtr.Zero)
            {
                return(null);
            }
            var weakCache = CfxRemoteCallContext.CurrentContext.connection.weakCache;

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