public ScriptArray GetKeys() { ScriptArray ret = Script.CreateArray(); foreach (KeyValuePair <object, ScriptObject> pair in m_listObject) { ret.Add(Script.CreateObject(pair.Key)); } return(ret); }
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)); }
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; }