From fdb24c46ac02447e05662227180927c9bd270276 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sat, 13 Sep 2008 14:40:42 +0000 Subject: Provide a GetApi method on the IScriptEngine to get a named API reference This allows cross-api method calls on the implementation and also allows "Meta APIs" that only provide common functionality to other APIs --- OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'OpenSim/Region/ScriptEngine/Shared/Instance') diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs index 1ee6f77..8f6108d 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs @@ -714,5 +714,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance throw new Exception("Completed persistence save, but no file was created"); } } + + public IScriptApi GetApi(string name) + { + if (m_Apis.ContainsKey(name)) + return m_Apis[name]; + return null; + } } } -- cgit v1.1