2010-06-17 Geoff Norton <gnorton@novell.com>
[mono.git] / mono / tests / bug-544446.cs
blob80b8fe48ea804e91b01157b9748668569090238f
1 using System;
2 using System.Runtime.Remoting;
3 using System.Runtime.Remoting.Messaging;
4 using System.Runtime.Remoting.Proxies;
5 using System.Collections.Generic;
7 class MyProxy : RealProxy {
8 readonly MarshalByRefObject target;
10 public MyProxy (MarshalByRefObject target) : base (target.GetType())
12 this.target = target;
15 public override IMessage Invoke (IMessage request) {
16 IMethodCallMessage call = (IMethodCallMessage)request;
17 return RemotingServices.ExecuteMessage (target, call);
21 class R1 : MarshalByRefObject {
23 public void foo (out Dictionary<string, int> paramAssignmentStatus) {
25 paramAssignmentStatus = new Dictionary<string, int> ();
26 paramAssignmentStatus.Add ("One", 1);
30 class Test {
31 static int Main () {
32 MyProxy real_proxy = new MyProxy (new R1 ());
33 R1 o = (R1)real_proxy.GetTransparentProxy ();
35 Dictionary<string, int> i;
36 o.foo (out i);
37 if (1 == i["One"])
38 return 0;
39 return 1;