Exemple #1
0
 public override object Call(ScriptObject[] parameters)
 {
     if (FunctionType == FunstionType.Script)
     {
         return(m_ScriptFunction.Call(m_ParentContext, m_stackObject, parameters));
     }
     else
     {
         try {
             if (FunctionType == FunstionType.Handle)
             {
                 return(m_Handle.Call(parameters));
             }
             else if (FunctionType == FunstionType.Function)
             {
                 return(m_Function(parameters));
             }
             else if (FunctionType == FunstionType.Method)
             {
                 return(m_Method.Call(parameters));
             }
         } catch (System.Exception ex) {
             throw new ExecutionException(Script, "CallFunction [" + Name + "] is error : " + ex.ToString());
         }
     }
     return(null);
 }
 public override ScriptValue Call(ScriptValue thisObject, ScriptValue[] parameters, int length)
 {
     try {
         return(m_Handle.Call(thisObject, parameters, length));
     } catch (System.Exception ex) {
         throw new ExecutionException("CallFunction [" + FunctionName + "] is error : " + ex.ToString());
     }
 }
Exemple #3
0
 public override object Call(ScriptObject[] parameters)
 {
     try {
         return(m_Handle.Call(parameters));
     } catch (System.Exception ex) {
         throw new ExecutionException(Script, "CallFunction [" + Name + "] is error : " + ex.ToString());
     }
 }
Exemple #4
0
 public override ScriptObject Call(ScriptObject[] parameters)
 {
     if (FunctionType == FunstionType.Script)
     {
         return(m_ScriptFunction.Call(m_stackObject, parameters));
     }
     else
     {
         if (FunctionType == FunstionType.Function)
         {
             return(Script.CreateObject(m_Function(parameters)));
         }
         else if (FunctionType == FunstionType.Handle)
         {
             return(Script.CreateObject(m_Handle.Call(parameters)));
         }
         else if (FunctionType == FunstionType.Method)
         {
             return(Script.CreateObject(m_Method.Call(parameters)));
         }
     }
     return(null);
 }