public ScriptObject Call(Dictionary <String, ScriptObject> objs, ScriptObject[] parameters) { int length = parameters.Length; if (m_Params) { m_ParamsArray.Clear(); for (int i = 0; i < m_ParameterCount - 1; ++i) { objs[m_ListParameters[i]] = (parameters != null && length > i) ? parameters[i] : ScriptNull.Instance; } for (int i = m_ParameterCount - 1; i < length; ++i) { m_ParamsArray.Add(parameters[i]); } objs[m_ListParameters[m_ParameterCount - 1]] = m_ParamsArray; } else { for (int i = 0; i < m_ParameterCount; ++i) { objs[m_ListParameters[i]] = (parameters != null && length > i) ? parameters[i] : ScriptNull.Instance; } } m_Context.Initialize(m_ParentContext, objs); return(m_Context.Execute()); }