diff options
author | Mark Spruiell <mes@zeroc.com> | 2011-05-09 16:24:52 -0700 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2011-05-09 16:24:52 -0700 |
commit | 5d7de7f8f909d7a4910531a077e514955a1b0fdc (patch) | |
tree | 77b437188795dab60de6fbc5212528b0d88c182f /cs/test/Ice/exceptions/Client.cs | |
parent | Ice 3.4.2 installer updates (diff) | |
download | ice-5d7de7f8f909d7a4910531a077e514955a1b0fdc.tar.bz2 ice-5d7de7f8f909d7a4910531a077e514955a1b0fdc.tar.xz ice-5d7de7f8f909d7a4910531a077e514955a1b0fdc.zip |
merging .NET Compact Framework support
Diffstat (limited to 'cs/test/Ice/exceptions/Client.cs')
-rw-r--r-- | cs/test/Ice/exceptions/Client.cs | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/cs/test/Ice/exceptions/Client.cs b/cs/test/Ice/exceptions/Client.cs index d066abd41ba..20892e78e38 100644 --- a/cs/test/Ice/exceptions/Client.cs +++ b/cs/test/Ice/exceptions/Client.cs @@ -20,25 +20,34 @@ using System.Reflection; public class Client { - private static int - run(string[] args, Ice.Communicator communicator) + private static int run(string[] args, Ice.Communicator communicator) { ThrowerPrx thrower = AllTests.allTests(communicator, false); thrower.shutdown(); return 0; } - public static void - Main(string[] args) + public static int Main(string[] args) { int status = 0; Ice.Communicator communicator = null; - + +#if !COMPACT Debug.Listeners.Add(new ConsoleTraceListener()); +#endif try { - communicator = Ice.Util.initialize(ref args); + Ice.InitializationData data = new Ice.InitializationData(); +#if COMPACT + // + // When using Ice for .NET Compact Framework, we need to specify + // the assembly so that Ice can locate classes and exceptions. + // + data.properties = Ice.Util.createProperties(); + data.properties.setProperty("Ice.FactoryAssemblies", "client"); +#endif + communicator = Ice.Util.initialize(ref args, data); status = run(args, communicator); } catch(System.Exception ex) @@ -46,7 +55,7 @@ public class Client System.Console.WriteLine(ex); status = 1; } - + if(communicator != null) { try @@ -59,10 +68,7 @@ public class Client status = 1; } } - - if(status != 0) - { - System.Environment.Exit(status); - } + + return status; } } |