1 using System
.Collections
;
2 using System
.Collections
.Generic
;
3 using System
.Runtime
.Remoting
;
4 using System
.Runtime
.Remoting
.Channels
;
6 using Ch
.Elca
.Iiop
.Idl
;
7 using Ch
.Elca
.Iiop
.Services
;
11 public class ConsoleApp
13 public static void Main(string[] args
)
17 Console
.WriteLine("Usage: client.exe server.ior");
21 MappingConfiguration
.Instance
.UseBoxedInAny
= false;
23 IDictionary props
= new Hashtable();
24 IiopChannel channel
= new IiopChannel(props
);
25 ChannelServices
.RegisterChannel(channel
, false);
27 StreamReader sr
= new StreamReader(args
[0]);
28 string ior
= sr
.ReadLine();
30 Test test
= (Test
)RemotingServices
.Connect(typeof(Test
), ior
);
31 object[] p
= new object[2];
32 for(int i
= 0; i
< p
.Length
; ++i
)
41 container
.contents
= inner
;
49 for(int i
= 0; i
< p
.Length
; ++i
)
53 Inner inner
= (Inner
)((Container
)p
[i
]).contents
;
54 Console
.WriteLine("[{0}]: {1} {2} {3} {4} {5}", i
,
55 inner
.value1
, inner
.value2
, inner
.value3
, inner
.value4
, inner
.value5
);
62 Console
.WriteLine("Invoke failed: {0}", ex
.ToString());