Exemplo n.º 1
0
        public HostEvent(EventInfo eventInfo, VAL func)
        {
            this.eventInfo = eventInfo;
            this.func      = func;
            ContextInstance temp = (ContextInstance)func.temp;

            this.context  = temp.context;
            this.instance = temp.instance;

            this.DS2 = this.context.DataSegment;
        }
Exemplo n.º 2
0
        public static object CallFunc(VAL funccon, object[] arguments)
        {
            if (funccon.ty == VALTYPE.funccon)
            {
                ContextInstance temp     = (ContextInstance)funccon.temp;
                Context         context  = temp.context;
                VAL             instance = temp.instance;
                VAL             ret      = CPU.ExternalUserFuncCall(funccon, instance, VAL.Boxing(arguments), context);
                return(ret.HostValue);
            }

            throw new HostTypeException("VAL {0} is not funccon type.", funccon);
        }