diff options
author | Melanie | 2012-03-26 16:47:02 +0100 |
---|---|---|
committer | Melanie | 2012-03-26 16:47:02 +0100 |
commit | 0bd0514e811b03e4a52fa6d006f901b1a50d2d92 (patch) | |
tree | 26ec87e5b19697a56a2daaa8b31c2f2603485b84 /OpenSim/Region/OptionalModules | |
parent | Merge branch 'master' into careminster (diff) | |
parent | Add some more overloads to allow registering overloaded methods and lists (diff) | |
download | opensim-SC_OLD-0bd0514e811b03e4a52fa6d006f901b1a50d2d92.zip opensim-SC_OLD-0bd0514e811b03e4a52fa6d006f901b1a50d2d92.tar.gz opensim-SC_OLD-0bd0514e811b03e4a52fa6d006f901b1a50d2d92.tar.bz2 opensim-SC_OLD-0bd0514e811b03e4a52fa6d006f901b1a50d2d92.tar.xz |
Merge branch 'master' into careminster
Diffstat (limited to 'OpenSim/Region/OptionalModules')
-rw-r--r-- | OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs b/OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs index 0605590..cab30de 100644 --- a/OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs +++ b/OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs | |||
@@ -130,9 +130,6 @@ namespace OpenSim.Region.CoreModules.Scripting.ScriptModuleComms | |||
130 | 130 | ||
131 | public void RegisterScriptInvocation(object target, string meth) | 131 | public void RegisterScriptInvocation(object target, string meth) |
132 | { | 132 | { |
133 | m_log.DebugFormat("[MODULE COMMANDS] Register method {0} from type {1}",meth,target.GetType().Name); | ||
134 | |||
135 | |||
136 | MethodInfo mi = target.GetType().GetMethod(meth, | 133 | MethodInfo mi = target.GetType().GetMethod(meth, |
137 | BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance); | 134 | BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance); |
138 | if (mi == null) | 135 | if (mi == null) |
@@ -140,7 +137,20 @@ namespace OpenSim.Region.CoreModules.Scripting.ScriptModuleComms | |||
140 | m_log.WarnFormat("[MODULE COMMANDS] Failed to register method {0}",meth); | 137 | m_log.WarnFormat("[MODULE COMMANDS] Failed to register method {0}",meth); |
141 | return; | 138 | return; |
142 | } | 139 | } |
143 | 140 | ||
141 | RegisterScriptInvocation(target, mi); | ||
142 | } | ||
143 | |||
144 | public void RegisterScriptInvocation(object target, string[] meth) | ||
145 | { | ||
146 | foreach (string m in meth) | ||
147 | RegisterScriptInvocation(target, m); | ||
148 | } | ||
149 | |||
150 | public void RegisterScriptInvocation(object target, MethodInfo mi) | ||
151 | { | ||
152 | m_log.DebugFormat("[MODULE COMMANDS] Register method {0} from type {1}", mi.Name, target.GetType().Name); | ||
153 | |||
144 | Type delegateType; | 154 | Type delegateType; |
145 | var typeArgs = mi.GetParameters() | 155 | var typeArgs = mi.GetParameters() |
146 | .Select(p => p.ParameterType) | 156 | .Select(p => p.ParameterType) |