diff options
Diffstat (limited to 'cs/test/Ice/servantLocator/Server.cs')
-rwxr-xr-x | cs/test/Ice/servantLocator/Server.cs | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/cs/test/Ice/servantLocator/Server.cs b/cs/test/Ice/servantLocator/Server.cs new file mode 100755 index 00000000000..6280e1373d4 --- /dev/null +++ b/cs/test/Ice/servantLocator/Server.cs @@ -0,0 +1,39 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. +// +// This copy of Ice is licensed to you under the terms described in the +// ICE_LICENSE file included in this distribution. +// +// ********************************************************************** + +public class Server +{ + internal class TestServer : Ice.Application + { + public override int run(string[] args) + { + communicator().getProperties().setProperty("Ice.OA.TestAdapter.Endpoints", "default -p 12010 -t 2000"); + 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.activate(); + adapter.waitForDeactivate(); + return 0; + } + } + + public static void Main(string[] args) + { + TestServer app = new TestServer(); + int result = app.main(args); + if(result != 0) + { + System.Environment.Exit(result); + } + } +} |