2 // System.Runtime.Remoting.Proxies.RealProxy.cs
5 // Dietmar Maurer (dietmar@ximian.com)
7 // (C) 2001 Ximian, Inc. http://www.ximian.com
11 using System.Runtime.Remoting.Messaging;
12 using System.Runtime.CompilerServices;
15 namespace System.Runtime.Remoting.Proxies
17 internal class TransparentProxy {
21 public abstract class RealProxy {
25 protected RealProxy () {
26 throw new NotImplementedException ();
29 protected RealProxy (Type classToProxy) {
30 this.class_to_proxy = classToProxy;
33 protected RealProxy (Type classToProxy, IntPtr stub, object stubData) {
34 throw new NotImplementedException ();
37 public abstract IMessage Invoke (IMessage msg);
39 /* this is called from unmanaged code */
40 internal static object PrivateInvoke (RealProxy rp, IMessage msg, out Exception exc,
41 out object [] out_args)
43 IMethodReturnMessage res_msg = (IMethodReturnMessage)rp.Invoke (msg);
45 exc = res_msg.Exception;
46 out_args = res_msg.OutArgs;
47 return res_msg.ReturnValue;
50 [MethodImplAttribute(MethodImplOptions.InternalCall)]
51 public extern virtual object GetTransparentProxy ();