Пример #1
0
        protected IValue CallScriptMethod(int methodIndex, IValue[] parameters)
        {
            IValue returnValue = null;

            _machine.StateConsistentOperation(() =>
            {
                _machine.SetModule(_module);
                _machine.AttachContext(this, true);
                returnValue = _machine.ExecuteMethod(methodIndex, parameters);
            });

            return(returnValue);
        }
Пример #2
0
 public override void CallAsProcedure(int methodNumber, IValue[] arguments)
 {
     if (MethodDefinedInScript(methodNumber))
     {
         _machine.StateConsistentOperation(() =>
         {
             _machine.AttachContext(this, true);
             _machine.SetModule(_module);
             _machine.ExecuteMethod(methodNumber - METHOD_COUNT, arguments);
         });
     }
     else
     {
         CallOwnProcedure(methodNumber, arguments);
     }
 }
Пример #3
0
        protected IValue CallScriptMethod(int methodIndex, IValue[] parameters)
        {
            var returnValue = _machine.ExecuteMethod(this, methodIndex, parameters);

            return(returnValue);
        }