2003-02-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
authorGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Mon, 3 Feb 2003 18:43:10 +0000 (18:43 -0000)
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Mon, 3 Feb 2003 18:43:10 +0000 (18:43 -0000)
* RemotingServices.cs:
(GetMethodBaseFromMethodMessage): fixed to make it also work with
internal methods without MethodSignature (see ApplicationHost.cs).

svn path=/trunk/mcs/; revision=11178

mcs/class/corlib/System.Runtime.Remoting/ChangeLog
mcs/class/corlib/System.Runtime.Remoting/RemotingServices.cs

index b9d002a50f0b5b33913afc41a56a356d7d42b3c5..4235002006c1bfeac7bd9331afa827cc08b8e3e2 100755 (executable)
@@ -1,3 +1,9 @@
+2003-02-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * RemotingServices.cs:
+       (GetMethodBaseFromMethodMessage): fixed to make it also work with
+       internal methods without MethodSignature (see ApplicationHost.cs).
+
 2003-02-03 Patrik Torstensson
 
        * ObjRef.cs: added copy constructor and two helpers for cross 
index 05c55b949dc9079d0d7e076107dfc0d8788b3d75..efebbbebd2df642866c4f6a158e72d1a3e79d61b 100644 (file)
@@ -156,12 +156,15 @@ namespace System.Runtime.Remoting
 
                public static MethodBase GetMethodBaseFromMethodMessage(IMethodMessage msg)
                {
-                       Type type = Type.GetType(msg.TypeName);
+                       Type type = Type.GetType (msg.TypeName);
+                       if (type == null)
+                               throw new RemotingException ("Type '" + msg.TypeName + "' not found!");
 
+                       BindingFlags bflags = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic;
                        if (msg.MethodSignature == null)
-                               return type.GetMethod (msg.MethodName);
+                               return type.GetMethod (msg.MethodName, bflags);
                        else
-                               return type.GetMethod (msg.MethodName, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic, null, (Type[]) msg.MethodSignature, null);
+                               return type.GetMethod (msg.MethodName, bflags, null, (Type[]) msg.MethodSignature, null);
                }
 
                public static void GetObjectData(object obj, SerializationInfo info, StreamingContext context)