private RegisterInvokeHandler ( |
||
proxy | ||
callback | ManagedJSFunctionCallback | |
return | void |
// -------------------------------------------------------------------------------------------------------------------- /// <summary> /// Registers an invoke handler on the underlying native ObjectTemplate instance, which allows the object to be called like a method. /// </summary> /// <param name="callback">A callback that gets invoked </param> public void RegisterInvokeHandler(JSFunction callback) { V8NetProxy.RegisterInvokeHandler(_NativeObjectTemplateProxy, (managedObjectID, isConstructCall, _this, args, argCount) => { return(FunctionTemplate._CallBack(managedObjectID, isConstructCall, _this, args, argCount, callback)); }); _Engine._StoreAccessor <JSFunction>(_NativeObjectTemplateProxy->ObjectID, "$__InvokeHandler", callback); }