Welcome to mirror list, hosted at ThFree Co, Russian Federation.

RealProxy.cs « System.Runtime.Remoting.Proxies « corlib « class « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 16131866bc4174fc45a68cfd90820dc744746fef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
//
// System.Runtime.Remoting.Proxies.RealProxy.cs
//
// Authors:
//   Dietmar Maurer (dietmar@ximian.com)
//
// (C) 2001 Ximian, Inc.  http://www.ximian.com
//

using System;
using System.Runtime.Remoting.Messaging;
using System.Runtime.CompilerServices;


namespace System.Runtime.Remoting.Proxies
{
	internal class TransparentProxy {
		public RealProxy _rp;
		IntPtr _class;
	}
	
	public abstract class RealProxy {

		Type class_to_proxy;

		protected RealProxy () {
			throw new NotImplementedException ();
		}

		protected RealProxy (Type classToProxy) {
			this.class_to_proxy = classToProxy;
		}

		protected RealProxy (Type classToProxy, IntPtr stub, object stubData) {
			throw new NotImplementedException ();
		}

		public abstract IMessage Invoke (IMessage msg);

		/* this is called from unmanaged code */
		internal static object PrivateInvoke (RealProxy rp, IMessage msg, out Exception exc,
						      out object [] out_args)
		{
			IMethodReturnMessage res_msg = (IMethodReturnMessage)rp.Invoke (msg);

			exc = res_msg.Exception;
			out_args = res_msg.OutArgs;
			return res_msg.ReturnValue;
		}

		[MethodImplAttribute(MethodImplOptions.InternalCall)]
		public extern virtual object GetTransparentProxy ();
		
	}

}