fixed member accessibility to match MS (corcompare).
[mono.git] / mcs / class / corlib / System.Runtime.Remoting / RemotingServices.cs
1 //
2 // System.Runtime.Remoting.RemotingServices.cs
3 //
4 // Authors:
5 //   Dietmar Maurer (dietmar@ximian.com)
6 //
7 // (C) 2001 Ximian, Inc.  http://www.ximian.com
8 //
9
10 using System;
11 using System.Reflection;
12 using System.Runtime.Remoting.Messaging;
13 using System.Runtime.CompilerServices;
14
15 namespace System.Runtime.Remoting
16 {
17         public sealed class RemotingServices {
18
19                 private RemotingServices () {}
20
21                 [MethodImplAttribute(MethodImplOptions.InternalCall)]
22                 internal extern static object InternalExecute (MonoMethod method, Object obj,
23                                                                Object[] parameters, out object [] out_args);
24
25                 [MethodImplAttribute(MethodImplOptions.InternalCall)]
26                 public extern static bool IsTransparentProxy (object proxy);
27                 
28                 public static IMethodReturnMessage ExecuteMessage (
29                         MarshalByRefObject target, IMethodCallMessage reqMsg)
30                 {
31                         ReturnMessage result;
32                         
33                         MonoMethod method = (MonoMethod)reqMsg.MethodBase;
34
35                         try {
36                                 object [] out_args;
37                                 object rval = InternalExecute (method, target, reqMsg.Args, out out_args);
38                                 result = new ReturnMessage (rval, out_args, out_args.Length,
39                                                             reqMsg.LogicalCallContext, reqMsg);
40                         
41                         } catch (Exception e) {
42                                 result = new ReturnMessage (e, reqMsg);
43                         }
44
45                         return result;
46                 }
47                                                                    
48                 
49         }
50 }