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
;
12 using System
.Reflection
;
14 [assembly
: CLSCompliant(true)]
16 [assembly
: AssemblyTitle("IceTest")]
17 [assembly
: AssemblyDescription("Ice test")]
18 [assembly
: AssemblyCompany("ZeroC, Inc.")]
22 private static int run(string[] args
, Ice
.Communicator communicator
)
24 AllTests
.allTests(communicator
);
28 public static int Main(string[] args
)
31 Ice
.Communicator communicator
= null;
34 Debug
.Listeners
.Add(new ConsoleTraceListener());
39 Ice
.InitializationData initData
= new Ice
.InitializationData();
40 initData
.properties
= Ice
.Util
.createProperties(ref args
);
41 initData
.properties
.setProperty("Ice.Warn.AMICallback", "0");
42 initData
.dispatcher
= new Dispatcher().dispatch
;
43 communicator
= Ice
.Util
.initialize(ref args
, initData
);
44 status
= run(args
, communicator
);
46 catch(System
.Exception ex
)
48 System
.Console
.Error
.WriteLine(ex
);
52 if(communicator
!= null)
56 communicator
.destroy();
58 catch(Ice
.LocalException ex
)
60 System
.Console
.Error
.WriteLine(ex
);
65 Dispatcher
.terminate();