diff options
author | SignpostMarv | 2012-08-31 13:51:00 +0100 |
---|---|---|
committer | Melanie | 2012-08-31 14:32:33 +0100 |
commit | 054db94d5d14fdd50cb2ca9a95a8d5cac2ab234a (patch) | |
tree | 0584a26d90d876a82b5601c1bb17ba7308d4566f /OpenSim | |
parent | adding support for static method script invocations (diff) | |
download | opensim-SC_OLD-054db94d5d14fdd50cb2ca9a95a8d5cac2ab234a.zip opensim-SC_OLD-054db94d5d14fdd50cb2ca9a95a8d5cac2ab234a.tar.gz opensim-SC_OLD-054db94d5d14fdd50cb2ca9a95a8d5cac2ab234a.tar.bz2 opensim-SC_OLD-054db94d5d14fdd50cb2ca9a95a8d5cac2ab234a.tar.xz |
formatting
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs b/OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs index d6d96c9..8d100e8 100644 --- a/OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs +++ b/OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs | |||
@@ -172,12 +172,12 @@ namespace OpenSim.Region.OptionalModules.Scripting.ScriptModuleComms | |||
172 | 172 | ||
173 | if (mi.ReturnType == typeof(void)) | 173 | if (mi.ReturnType == typeof(void)) |
174 | { | 174 | { |
175 | delegateType = Expression.GetActionType(typeArgs.ToArray()); | 175 | delegateType = Expression.GetActionType(typeArgs.ToArray()); |
176 | } | 176 | } |
177 | else | 177 | else |
178 | { | 178 | { |
179 | typeArgs.Add(mi.ReturnType); | 179 | typeArgs.Add(mi.ReturnType); |
180 | delegateType = Expression.GetFuncType(typeArgs.ToArray()); | 180 | delegateType = Expression.GetFuncType(typeArgs.ToArray()); |
181 | } | 181 | } |
182 | 182 | ||
183 | Delegate fcall; | 183 | Delegate fcall; |
@@ -188,13 +188,13 @@ namespace OpenSim.Region.OptionalModules.Scripting.ScriptModuleComms | |||
188 | 188 | ||
189 | lock (m_scriptInvocation) | 189 | lock (m_scriptInvocation) |
190 | { | 190 | { |
191 | ParameterInfo[] parameters = fcall.Method.GetParameters (); | 191 | ParameterInfo[] parameters = fcall.Method.GetParameters(); |
192 | if (parameters.Length < 2) // Must have two UUID params | 192 | if (parameters.Length < 2) // Must have two UUID params |
193 | return; | 193 | return; |
194 | 194 | ||
195 | // Hide the first two parameters | 195 | // Hide the first two parameters |
196 | Type[] parmTypes = new Type[parameters.Length - 2]; | 196 | Type[] parmTypes = new Type[parameters.Length - 2]; |
197 | for (int i = 2 ; i < parameters.Length ; i++) | 197 | for (int i = 2; i < parameters.Length; i++) |
198 | parmTypes[i - 2] = parameters[i].ParameterType; | 198 | parmTypes[i - 2] = parameters[i].ParameterType; |
199 | m_scriptInvocation[fcall.Method.Name] = new ScriptInvocationData(fcall.Method.Name, fcall, parmTypes, fcall.Method.ReturnType); | 199 | m_scriptInvocation[fcall.Method.Name] = new ScriptInvocationData(fcall.Method.Name, fcall, parmTypes, fcall.Method.ReturnType); |
200 | } | 200 | } |