1 // **********************************************************************
3 // Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
5 // This copy of Ice is licensed to you under the terms described in the
6 // ICE_LICENSE file included in this distribution.
8 // **********************************************************************
11 using System
.Diagnostics
;
15 private static int run(string[] args
, Ice
.Communicator communicator
)
17 communicator
.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010 -t 2000");
18 Ice
.ObjectAdapter adapter
= communicator
.createObjectAdapter("TestAdapter");
19 Ice
.Object
@object = new Test
.ChecksumI();
20 adapter
.add(@object, communicator
.stringToIdentity("test"));
22 communicator
.waitForShutdown();
26 public static int Main(string[] args
)
29 Ice
.Communicator communicator
= null;
32 Debug
.Listeners
.Add(new ConsoleTraceListener());
37 communicator
= Ice
.Util
.initialize(ref args
);
38 status
= run(args
, communicator
);
40 catch(System
.Exception ex
)
42 Console
.Error
.WriteLine(ex
);
46 if(communicator
!= null)
50 communicator
.destroy();
52 catch (Ice
.LocalException ex
)
54 Console
.Error
.WriteLine(ex
);