[corlib] Cluster all tests that require large file support under the LargeFileSupport...
[mono.git] / mcs / class / corlib / System.Runtime.Remoting / RemotingServices.cs
index bc424ce5e2d7d40c6d6a12cc4aa88eec2f7eb76f..815c1ba7e73727e93d0d58ca15d81976c08fe14d 100644 (file)
@@ -477,7 +477,7 @@ namespace System.Runtime.Remoting
                public static bool IsMethodOverloaded(IMethodMessage msg)
                {
                        const BindingFlags bfinst = BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance;
-                       MonoType type = (MonoType) msg.MethodBase.DeclaringType;
+                       RuntimeType type = (RuntimeType) msg.MethodBase.DeclaringType;
                        return type.GetMethodsByName (msg.MethodName, bfinst, false, type).Length > 1;
                }
 
@@ -581,7 +581,7 @@ namespace System.Runtime.Remoting
                        RemotingProxy proxy = new RemotingProxy (type, ChannelServices.CrossContextUrl, activationAttributes);
                        return proxy.GetTransparentProxy();
                }
-#if !NET_2_1
+#if !MOBILE
                internal static object CreateClientProxyForComInterop (Type type)
                {
                        Mono.Interop.ComInteropProxy proxy = Mono.Interop.ComInteropProxy.CreateProxy (type);
@@ -808,45 +808,15 @@ namespace System.Runtime.Remoting
                [SecurityPermission (SecurityAction.Assert, SerializationFormatter = true)] // FIXME: to be reviewed
                internal static byte[] SerializeExceptionData (Exception ex)
                {
+                       byte[] result = null;
                        try {
-                               int retry = 4;
-                               
-                               do {
-                                       try {
-                                               MemoryStream ms = new MemoryStream ();
-                                               _serializationFormatter.Serialize (ms, ex);
-                                               return ms.ToArray ();
-                                       }
-                                       catch (Exception e) {
-                                               if (e is ThreadAbortException) {
-#if MONO_FEATURE_THREAD_ABORT
-                                                       Thread.ResetAbort ();
-#endif
-                                                       retry = 5;
-                                                       ex = e;
-                                               }
-                                               else if (retry == 2) {
-                                                       ex = new Exception ();
-                                                       ex.SetMessage (e.Message);
-                                                       ex.SetStackTrace (e.StackTrace);
-                                               }
-                                               else
-                                                       ex = e;
-                                       }
-                                       retry--;
-                               }
-                               while (retry > 0);
-                               
-                               return null;
-                       }
-                       catch (Exception tex)
-                       {
-                               byte[] data = SerializeExceptionData (tex);
-#if MONO_FEATURE_THREAD_ABORT
-                               Thread.ResetAbort ();
-#endif
-                               return data;
+                               /* empty - we're only interested in the protected block */
+                       } finally {
+                               MemoryStream ms = new MemoryStream ();
+                               _serializationFormatter.Serialize (ms, ex);
+                               result = ms.ToArray ();
                        }
+                       return result;
                }
                
                internal static object GetDomainProxy(AppDomain domain)