diff options
Diffstat (limited to 'csharp/test/Glacier2/sessionHelper/Server.cs')
-rw-r--r-- | csharp/test/Glacier2/sessionHelper/Server.cs | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/csharp/test/Glacier2/sessionHelper/Server.cs b/csharp/test/Glacier2/sessionHelper/Server.cs index c480575741a..12e5d65819c 100644 --- a/csharp/test/Glacier2/sessionHelper/Server.cs +++ b/csharp/test/Glacier2/sessionHelper/Server.cs @@ -8,7 +8,6 @@ // ********************************************************************** using System; -using System.Diagnostics; using System.Reflection; [assembly: CLSCompliant(true)] @@ -17,27 +16,24 @@ using System.Reflection; [assembly: AssemblyDescription("Ice test")] [assembly: AssemblyCompany("ZeroC, Inc.")] -public class Server +public class Server : TestCommon.Application { - public class App : Ice.Application + public override int run(string[] args) { - public override int run(string[] args) - { - communicator().getProperties().setProperty("DeactivatedAdapter.Endpoints", "default -p 12011"); - communicator().createObjectAdapter("DeactivatedAdapter"); + communicator().getProperties().setProperty("DeactivatedAdapter.Endpoints", getTestEndpoint(1)); + communicator().createObjectAdapter("DeactivatedAdapter"); - communicator().getProperties().setProperty("CallbackAdapter.Endpoints", "default -p 12010"); - Ice.ObjectAdapter adapter = communicator().createObjectAdapter("CallbackAdapter"); - adapter.add(new CallbackI(), communicator().stringToIdentity("callback")); - adapter.activate(); - communicator().waitForShutdown(); - return 0; - } + communicator().getProperties().setProperty("CallbackAdapter.Endpoints", getTestEndpoint(0)); + Ice.ObjectAdapter adapter = communicator().createObjectAdapter("CallbackAdapter"); + adapter.add(new CallbackI(), Ice.Util.stringToIdentity("callback")); + adapter.activate(); + communicator().waitForShutdown(); + return 0; } public static int Main(string[] args) { - App app = new App(); - return app.main(args); + Server app = new Server(); + return app.runmain(args); } } |