7b015e33de546504d940137af82119e9a2e6cd8e
[mono.git] / mcs / class / System.Runtime.Remoting / Test / SyncCalls.cs
1 //
2 // MonoTests.System.Runtime.Remoting.SyncCalls.cs
3 //
4 // Author: Lluis Sanchez Gual (lluis@ximian.com)
5 //
6 // 2003 (C) Copyright, Ximian, Inc.
7 //
8
9 using System;
10 using System.Collections;
11 using NUnit.Framework;
12
13 namespace MonoTests.System.Runtime.Remoting
14 {
15         public abstract class SyncCallTest : BaseCallTest
16         {
17                 public override InstanceSurrogate GetInstanceSurrogate () { return new SyncInstanceSurrogate (); }
18                 public override AbstractSurrogate GetAbstractSurrogate () { return new SyncAbstractSurrogate (); }
19                 public override InterfaceSurrogate GetInterfaceSurrogate () { return new SyncInterfaceSurrogate (); }
20         }
21
22         public class SyncInstanceSurrogate : InstanceSurrogate
23         {
24                 public override int Simple ()
25                 {
26                         return RemoteObject.Simple ();
27                 }
28
29                 public override string PrimitiveParams (int a, uint b, char c, string d)
30                 {
31                         return RemoteObject.PrimitiveParams (a, b, c, d);
32                 }
33
34                 public override string PrimitiveParamsInOut (ref int a1, out int a2, ref float b1, out float b2, ref char c1, out char c2, ref string d1, out string d2)
35                 {
36                         return RemoteObject.PrimitiveParamsInOut (ref a1, out a2, ref b1, out b2, ref c1, out c2, ref d1, out d2);
37                 }
38
39                 public override Complex ComplexParams (ArrayList a, Complex b, string c)
40                 {
41                         return RemoteObject.ComplexParams (a, b, c);
42                 }
43
44                 public override Complex ComplexParamsInOut (ref ArrayList a, out Complex b, string c)
45                 {
46                         return RemoteObject.ComplexParamsInOut (ref a, out b, c);
47                 }
48         }
49
50         public class SyncAbstractSurrogate : AbstractSurrogate
51         {
52                 public override int Simple ()
53                 {
54                         return RemoteObject.Simple ();
55                 }
56
57                 public override string PrimitiveParams (int a, uint b, char c, string d)
58                 {
59                         return RemoteObject.PrimitiveParams (a, b, c, d);
60                 }
61
62                 public override string PrimitiveParamsInOut (ref int a1, out int a2, ref float b1, out float b2, ref char c1, out char c2, ref string d1, out string d2)
63                 {
64                         return RemoteObject.PrimitiveParamsInOut (ref a1, out a2, ref b1, out b2, ref c1, out c2, ref d1, out d2);
65                 }
66
67                 public override Complex ComplexParams (ArrayList a, Complex b, string c)
68                 {
69                         return RemoteObject.ComplexParams (a, b, c);
70                 }
71
72                 public override Complex ComplexParamsInOut (ref ArrayList a, out Complex b, string c)
73                 {
74                         return RemoteObject.ComplexParamsInOut (ref a, out b, c);
75                 }
76         }
77
78         public class SyncInterfaceSurrogate : InterfaceSurrogate
79         {
80                 public override int Simple ()
81                 {
82                         return RemoteObject.Simple ();
83                 }
84
85                 public override string PrimitiveParams (int a, uint b, char c, string d)
86                 {
87                         return RemoteObject.PrimitiveParams (a, b, c, d);
88                 }
89
90                 public override string PrimitiveParamsInOut (ref int a1, out int a2, ref float b1, out float b2, ref char c1, out char c2, ref string d1, out string d2)
91                 {
92                         return RemoteObject.PrimitiveParamsInOut (ref a1, out a2, ref b1, out b2, ref c1, out c2, ref d1, out d2);
93                 }
94
95                 public override Complex ComplexParams (ArrayList a, Complex b, string c)
96                 {
97                         return RemoteObject.ComplexParams (a, b, c);
98                 }
99
100                 public override Complex ComplexParamsInOut (ref ArrayList a, out Complex b, string c)
101                 {
102                         return RemoteObject.ComplexParamsInOut (ref a, out b, c);
103                 }
104         }
105 }
106