public override object Invoke(object obj, ScriptValue[] parameters)
        {
            var ret = FastMethod.Call(obj, MethodIndex, Args);

            for (var i = 0; i < RequiredNumber; ++i)
            {
                if (RefOuts[i])
                {
                    var instance = parameters[i].Get <ScriptInstance>();
                    if (instance == null)
                    {
                        throw new ExecutionException($"带 ref out 标识的字段,必须传入 map, Index : {i}");
                    }
                    instance.SetValue(RefOutValue, ScriptValue.CreateValue(Args[i]));
                }
            }
            return(ret);
        }
Exemplo n.º 2
0
 public override object Invoke(object obj, ScriptValue[] parameters)
 {
     return(FastMethod.Call(obj, MethodIndex, Args));
 }