public NativeJsInstanceProxy CreateProxyForObject(object o, JsTypeDefinition jsTypeDefinition) { if (_createdWrappers.TryGetValue(o, out NativeJsInstanceProxy found)) { return(found); } var proxyObject = new NativeJsInstanceProxy( _nativeRefList.Count, o, jsTypeDefinition); _nativeRefList.Add(proxyObject); _createdWrappers.Add(o, proxyObject); //register NativeV8JsInterOp.CreateNativePart(_ownerContext, proxyObject); return(proxyObject); }
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; }