Exemplo n.º 1
0
        public NativeJsInstanceProxy CreateProxyForObject(object o, JsTypeDefinition jsTypeDefinition)
        {
            NativeJsInstanceProxy found;

            if (this.createdWrappers.TryGetValue(o, out found))
            {
                return(found);
            }

            var proxyObject = new NativeJsInstanceProxy(
                nativeRefList.Count,
                o,
                jsTypeDefinition);

            nativeRefList.Add(proxyObject);
            this.createdWrappers.Add(o, proxyObject);

            //register
            NativeV8JsInterOp.CreateNativePart(ownerContext, proxyObject);
            return(proxyObject);
        }
Exemplo n.º 2
0
        public NativeJsInstanceProxy CreateProxyForObject(object o, JsTypeDefinition jsTypeDefinition)
        {
            NativeJsInstanceProxy found;
            if (this.createdWrappers.TryGetValue(o, out found))
            {
                return found;
            }

            var proxyObject = new NativeJsInstanceProxy(
                nativeRefList.Count,
                o,
                jsTypeDefinition);

            nativeRefList.Add(proxyObject);
            this.createdWrappers.Add(o, proxyObject);

            //register
            NativeV8JsInterOp.CreateNativePart(ownerContext, proxyObject);
            return proxyObject;
        }