summaryrefslogtreecommitdiff
path: root/csharp/test/Ice/servantLocator/Server.cs
diff options
context:
space:
mode:
Diffstat (limited to 'csharp/test/Ice/servantLocator/Server.cs')
-rw-r--r--csharp/test/Ice/servantLocator/Server.cs32
1 files changed, 14 insertions, 18 deletions
diff --git a/csharp/test/Ice/servantLocator/Server.cs b/csharp/test/Ice/servantLocator/Server.cs
index 4d1f284e8b2..3a0dc190174 100644
--- a/csharp/test/Ice/servantLocator/Server.cs
+++ b/csharp/test/Ice/servantLocator/Server.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
@@ -17,29 +16,26 @@ using System.Reflection;
[assembly: AssemblyDescription("Ice test")]
[assembly: AssemblyCompany("ZeroC, Inc.")]
-public class Server
+public class Server : TestCommon.Application
{
- internal class App : Ice.Application
+ public override int run(string[] args)
{
- public override int run(string[] args)
- {
- communicator().getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010");
- communicator().getProperties().setProperty("Ice.Warn.Dispatch", "0");
+ communicator().getProperties().setProperty("TestAdapter.Endpoints", getTestEndpoint(0));
+ communicator().getProperties().setProperty("Ice.Warn.Dispatch", "0");
- Ice.ObjectAdapter adapter = communicator().createObjectAdapter("TestAdapter");
- adapter.addServantLocator(new ServantLocatorI("category"), "category");
- adapter.addServantLocator(new ServantLocatorI(""), "");
- adapter.add(new TestI(), communicator().stringToIdentity("asm"));
- adapter.add(new TestActivationI(), communicator().stringToIdentity("test/activation"));
- adapter.activate();
- adapter.waitForDeactivate();
- return 0;
- }
+ Ice.ObjectAdapter adapter = communicator().createObjectAdapter("TestAdapter");
+ adapter.addServantLocator(new ServantLocatorI("category"), "category");
+ adapter.addServantLocator(new ServantLocatorI(""), "");
+ adapter.add(new TestI(), Ice.Util.stringToIdentity("asm"));
+ adapter.add(new TestActivationI(), Ice.Util.stringToIdentity("test/activation"));
+ adapter.activate();
+ adapter.waitForDeactivate();
+ return 0;
}
public static int Main(string[] args)
{
- App app = new App();
- return app.main(args);
+ Server app = new Server();
+ return app.runmain(args);
}
}