2 // System.Runtime.Remoting.RemotingServices.cs
5 // Dietmar Maurer (dietmar@ximian.com)
7 // (C) 2001 Ximian, Inc. http://www.ximian.com
11 using System.Reflection;
12 using System.Runtime.Remoting.Messaging;
13 using System.Runtime.CompilerServices;
15 namespace System.Runtime.Remoting
17 public sealed class RemotingServices {
19 [MethodImplAttribute(MethodImplOptions.InternalCall)]
20 internal extern static object InternalExecute (MonoMethod method, Object obj,
21 Object[] parameters, out object [] out_args);
23 [MethodImplAttribute(MethodImplOptions.InternalCall)]
24 internal extern static bool IsTransparentProxy (object proxy);
26 public static IMethodReturnMessage ExecuteMessage (
27 MarshalByRefObject target, IMethodCallMessage reqMsg)
31 MonoMethod method = (MonoMethod)reqMsg.MethodBase;
35 object rval = InternalExecute (method, target, reqMsg.Args, out out_args);
36 result = new ReturnMessage (rval, out_args, out_args.Length,
37 reqMsg.LogicalCallContext, reqMsg);
39 } catch (Exception e) {
40 result = new ReturnMessage (e, reqMsg);