Espresso.NativeV8JsInterOp.CtxRegisterManagedMethodCall C# (CSharp) Method

CtxRegisterManagedMethodCall() static private method

static private CtxRegisterManagedMethodCall ( Espresso.JsContext jsContext, ManagedMethodCallDel mMethodCall ) : void
jsContext Espresso.JsContext
mMethodCall ManagedMethodCallDel
return void
        internal static void CtxRegisterManagedMethodCall(JsContext jsContext, ManagedMethodCallDel mMethodCall)
        {
            //register managed method to js context
            ContextRegisterManagedCallback(
                jsContext.Handle.Handle,
                System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(mMethodCall),
                (int)ManagedCallbackKind.MethodCall);
        }

Usage Example

示例#1
0
        internal JsContext(int id,
                           JsEngine engine,
                           Action <int> notifyDispose,
                           JsTypeDefinitionBuilder jsTypeDefBuilder)
        {
            _id            = id;
            _notifyDispose = notifyDispose;
            _engine        = engine;
            _keepalives    = new KeepAliveDictionaryStore();
            //create native js context
            _context = new HandleRef(this, jscontext_new(id, engine.UnmanagedEngineHandler));
            _convert = new JsConvert(this);

            this.jsTypeDefBuilder = jsTypeDefBuilder;

            engineMethodCallbackDel = new ManagedMethodCallDel(EngineListener_MethodCall);
            NativeV8JsInterOp.CtxRegisterManagedMethodCall(this, engineMethodCallbackDel);
            registerMethods.Add(null);    //first is null
            registerProperties.Add(null); //first is null


            proxyStore = new NativeObjectProxyStore(this);
        }
All Usage Examples Of Espresso.NativeV8JsInterOp::CtxRegisterManagedMethodCall