summaryrefslogtreecommitdiff
path: root/csharp/test/Glacier2/router/Server.cs
diff options
context:
space:
mode:
Diffstat (limited to 'csharp/test/Glacier2/router/Server.cs')
-rw-r--r--csharp/test/Glacier2/router/Server.cs35
1 files changed, 13 insertions, 22 deletions
diff --git a/csharp/test/Glacier2/router/Server.cs b/csharp/test/Glacier2/router/Server.cs
index 4f8ae5a9e1c..f70adc61e6d 100644
--- a/csharp/test/Glacier2/router/Server.cs
+++ b/csharp/test/Glacier2/router/Server.cs
@@ -17,33 +17,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("CallbackAdapter.Endpoints", "tcp -p 12010");
- Ice.ObjectAdapter adapter = communicator().createObjectAdapter("CallbackAdapter");
- adapter.add(new CallbackI(),
- Ice.Util.stringToIdentity("c1/callback")); // The test allows "c1" as category.
- adapter.add(new CallbackI(),
- Ice.Util.stringToIdentity("c2/callback")); // The test allows "c2" as category.
- adapter.add(new CallbackI(),
- Ice.Util.stringToIdentity("c3/callback")); // The test rejects "c3" as category.
- adapter.add(new CallbackI(),
- Ice.Util.stringToIdentity("_userid/callback")); // The test allows the prefixed userid.
- 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("c1/callback")); // The test allows "c1" as category.
+ adapter.add(new CallbackI(), Ice.Util.stringToIdentity("c2/callback")); // The test allows "c2" as category.
+ adapter.add(new CallbackI(), Ice.Util.stringToIdentity("c3/callback")); // The test rejects "c3" as category.
+ adapter.add(new CallbackI(), Ice.Util.stringToIdentity("_userid/callback")); // The test allows the prefixed userid.
+ adapter.activate();
+ communicator().waitForShutdown();
+ return 0;
}
public static int Main(string[] args)
{
- Ice.InitializationData initData = new Ice.InitializationData();
- initData.properties = Ice.Util.createProperties(ref args);
- App app = new App();
- return app.main(args, initData);
+ Server app = new Server();
+ return app.runmain(args);
}
}