From a2985b5655d336b6da3ae48dcf80b9cbb16b90fb Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Wed, 27 Aug 2008 21:36:03 +0000 Subject: Refactor Executor into the script app domain and IScript. This changes an implicit reference into a proxied one and further reduces memory consumption of XEngine --- .../Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs index c28aa9a..9f0dd27 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs @@ -56,6 +56,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase public ScriptBaseClass() { + m_Executor = new Executor(this); + MethodInfo[] myArrayMethodInfo = GetType().GetMethods(BindingFlags.Public|BindingFlags.Instance); foreach (MethodInfo mi in myArrayMethodInfo) @@ -68,6 +70,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase } } + private Executor m_Executor = null; + + public int GetStateEventFlags(string state) + { + return (int)m_Executor.GetStateEventFlags(state); + } + + public void ExecuteEvent(string state, string FunctionName, object[] args) + { + m_Executor.ExecuteEvent(state, FunctionName, args); + } + public string[] GetApis() { string[] apis = new string[inits.Count]; -- cgit v1.1