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 private RemotingServices () {}
21 [MethodImplAttribute(MethodImplOptions.InternalCall)]
22 internal extern static object InternalExecute (MonoMethod method, Object obj,
23 Object[] parameters, out object [] out_args);
25 [MethodImplAttribute(MethodImplOptions.InternalCall)]
26 public extern static bool IsTransparentProxy (object proxy);
28 public static IMethodReturnMessage ExecuteMessage (
29 MarshalByRefObject target, IMethodCallMessage reqMsg)
33 MonoMethod method = (MonoMethod)reqMsg.MethodBase;
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);
41 } catch (Exception e) {
42 result = new ReturnMessage (e, reqMsg);