CreateObject() public method

public CreateObject ( object value ) : ScriptObject
value object
return ScriptObject
示例#1
0
        public ScriptArray GetKeys()
        {
            ScriptArray ret = Script.CreateArray();

            foreach (KeyValuePair <object, ScriptObject> pair in m_listObject)
            {
                ret.Add(Script.CreateObject(pair.Key));
            }
            return(ret);
        }
示例#2
0
        public ScriptObject call(params object[] args)
        {
            int length = args.Length;

            ScriptObject[] parameters = new ScriptObject[length];
            for (int i = 0; i < length; ++i)
            {
                parameters[i] = Script.CreateObject(args[i]);
            }
            return(Call(parameters));
        }
示例#3
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);
 }
 public CodeScriptObject(Script script, object obj, string breviary, int line)
     : base(breviary, line)
 {
     Object = script.CreateObject(obj);
 }
 public CodeScriptObject(Script script, object obj)
 {
     Object = script.CreateObject(obj);
 }
 public CodeScriptObject(Script script, object obj) {
     Object = script.CreateObject(obj);
     Object.Name = "" + obj;
 }