private ScriptExecutable m_ScriptExecutable; //函数执行命令 #endregion Fields #region Constructors public ScorpioScriptFunction(Script script, List<String> listParameters, ScriptExecutable scriptExecutable, bool bParams) { this.m_Script = script; this.m_ListParameters = new List<string>(listParameters); this.m_ScriptExecutable = scriptExecutable; this.m_ParameterCount = listParameters.Count; this.m_Params = bParams; this.m_ParamsArray = bParams ? script.CreateArray() : null; }
public override ScriptObject Clone() { ScriptArray ret = Script.CreateArray(); for (int i = 0; i < m_listObject.Count; ++i) { ret.m_listObject.Add(m_listObject[i].Clone()); } return(ret); }
public ScriptArray GetValues() { ScriptArray ret = Script.CreateArray(); foreach (KeyValuePair <object, ScriptObject> pair in m_listObject) { ret.Add(pair.Value.Assign()); } return(ret); }
public ScriptArray GetKeys() { ScriptArray ret = Script.CreateArray(); foreach (KeyValuePair <object, ScriptObject> pair in m_listObject) { ret.Add(Script.CreateObject(pair.Key)); } return(ret); }
public override ScriptObject Clone() { ScriptArray ret = Script.CreateArray(); ret.m_listObject = new ScriptObject[m_size]; ret.m_size = m_size; for (int i = 0; i < m_size; ++i) { if (m_listObject[i] == this) { ret.m_listObject[i] = ret; } else if (m_listObject[i] == null) { ret.m_listObject[i] = m_null; } else { ret.m_listObject[i] = m_listObject[i].Clone(); } } return(ret); }