diff options
author | Jose <jose@zeroc.com> | 2018-07-20 19:19:30 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2018-07-20 19:19:30 +0200 |
commit | f831849a119aa592d207fd38428517b414c2b39d (patch) | |
tree | 88c4d1c69072ad45eda621079f0d1d8b89a1fd8e /csharp/test/Ice/binding/RemoteCommunicatorI.cs | |
parent | Update Travis CI build to use ubuntu-18.04 (diff) | |
download | ice-f831849a119aa592d207fd38428517b414c2b39d.tar.bz2 ice-f831849a119aa592d207fd38428517b414c2b39d.tar.xz ice-f831849a119aa592d207fd38428517b414c2b39d.zip |
Xamarin testsuite
Diffstat (limited to 'csharp/test/Ice/binding/RemoteCommunicatorI.cs')
-rw-r--r-- | csharp/test/Ice/binding/RemoteCommunicatorI.cs | 76 |
1 files changed, 40 insertions, 36 deletions
diff --git a/csharp/test/Ice/binding/RemoteCommunicatorI.cs b/csharp/test/Ice/binding/RemoteCommunicatorI.cs index 8428a1ca1d2..fd671172ad2 100644 --- a/csharp/test/Ice/binding/RemoteCommunicatorI.cs +++ b/csharp/test/Ice/binding/RemoteCommunicatorI.cs @@ -7,51 +7,55 @@ // // ********************************************************************** -using Test; - -public class RemoteCommunicatorI : RemoteCommunicatorDisp_ +namespace Ice { - public override RemoteObjectAdapterPrx - createObjectAdapter(string name, string endpts, Ice.Current current) + namespace binding { - int retry = 5; - while(true) + public class RemoteCommunicatorI : Test.RemoteCommunicatorDisp_ { - try + public override Test.RemoteObjectAdapterPrx + createObjectAdapter(string name, string endpts, Ice.Current current) { - Ice.Communicator communicator = current.adapter.getCommunicator(); - string endpoints = endpts; - if(endpoints.IndexOf("-p") < 0) + int retry = 5; + while(true) { - endpoints = TestHelper.getTestEndpoint(communicator.getProperties(), _nextPort++, endpoints); - } + try + { + Ice.Communicator communicator = current.adapter.getCommunicator(); + string endpoints = endpts; + if(endpoints.IndexOf("-p") < 0) + { + endpoints = global::Test.TestHelper.getTestEndpoint(communicator.getProperties(), _nextPort++, endpoints); + } - communicator.getProperties().setProperty(name + ".ThreadPool.Size", "1"); - Ice.ObjectAdapter adapter = communicator.createObjectAdapterWithEndpoints(name, endpoints); - return RemoteObjectAdapterPrxHelper.uncheckedCast( - current.adapter.addWithUUID(new RemoteObjectAdapterI(adapter))); + communicator.getProperties().setProperty(name + ".ThreadPool.Size", "1"); + Ice.ObjectAdapter adapter = communicator.createObjectAdapterWithEndpoints(name, endpoints); + return Test.RemoteObjectAdapterPrxHelper.uncheckedCast( + current.adapter.addWithUUID(new RemoteObjectAdapterI(adapter))); + } + catch(Ice.SocketException) + { + if(--retry == 0) + { + throw; + } + } + } } - catch(Ice.SocketException) + + public override void + deactivateObjectAdapter(Test.RemoteObjectAdapterPrx adapter, Ice.Current current) { - if(--retry == 0) - { - throw; - } + adapter.deactivate(); // Collocated call. } - } - } - public override void - deactivateObjectAdapter(RemoteObjectAdapterPrx adapter, Ice.Current current) - { - adapter.deactivate(); // Collocated call. - } + public override void + shutdown(Ice.Current current) + { + current.adapter.getCommunicator().shutdown(); + } - public override void - shutdown(Ice.Current current) - { - current.adapter.getCommunicator().shutdown(); + private int _nextPort = 10; + } } - - private int _nextPort = 10; -}; +} |