summaryrefslogtreecommitdiff
path: root/csharp/test/xamarin/controller/MainPage.xaml.cs
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2018-11-21 17:47:35 +0100
committerBenoit Foucher <benoit@zeroc.com>2018-11-21 17:49:06 +0100
commita11945b449ae38efd6f79541c573c0028687c234 (patch)
treeb68a6c1b3a97b6e95009b5ec7810e891bb209a65 /csharp/test/xamarin/controller/MainPage.xaml.cs
parentFixed Android Bluetooth acceptor race condition, fixes #181 (diff)
downloadice-a11945b449ae38efd6f79541c573c0028687c234.tar.bz2
ice-a11945b449ae38efd6f79541c573c0028687c234.tar.xz
ice-a11945b449ae38efd6f79541c573c0028687c234.zip
Android and Xamarin test controller fixes and improvements
Diffstat (limited to 'csharp/test/xamarin/controller/MainPage.xaml.cs')
-rw-r--r--csharp/test/xamarin/controller/MainPage.xaml.cs23
1 files changed, 15 insertions, 8 deletions
diff --git a/csharp/test/xamarin/controller/MainPage.xaml.cs b/csharp/test/xamarin/controller/MainPage.xaml.cs
index 279c01a98f8..1b4814ae2e3 100644
--- a/csharp/test/xamarin/controller/MainPage.xaml.cs
+++ b/csharp/test/xamarin/controller/MainPage.xaml.cs
@@ -640,7 +640,7 @@ namespace controller
//initData.properties.setProperty("Ice.Trace.Protocol", "1");
initData.properties.setProperty("ControllerAdapter.AdapterId", new Guid().ToString());
- if(!mainPage.platformAdapter.registerProcessController())
+ if(!mainPage.platformAdapter.isEmulator())
{
initData.properties.setProperty("Ice.Plugin.IceDiscovery", "IceDiscovery:IceDiscovery.PluginFactory");
initData.properties.setProperty("IceDiscovery.DomainId", "TestController");
@@ -654,10 +654,7 @@ namespace controller
Util.stringToIdentity(mainPage.platformAdapter.processControllerIdentity())));
_adapter.activate();
- if(mainPage.platformAdapter.registerProcessController())
- {
- registerProcessController();
- }
+ registerProcessController();
_mainPage.print(mainPage.platformAdapter.processControllerIdentity());
}
@@ -670,9 +667,19 @@ namespace controller
{
if(_mainPage.RegisterProcessControllerEnabled())
{
- var registry = ProcessControllerRegistryPrxHelper.uncheckedCast(
- _communicator.stringToProxy(string.Format("Util/ProcessControllerRegistry:tcp -h {0} -p 15001",
- _mainPage.processControllerRegistryHost())));
+ ProcessControllerRegistryPrx registry;
+ if(_mainPage.processControllerRegistryHost().Length == 0)
+ {
+ registry = ProcessControllerRegistryPrxHelper.uncheckedCast(
+ _communicator.stringToProxy("Util/ProcessControllerRegistry"));
+ }
+ else
+ {
+ registry = ProcessControllerRegistryPrxHelper.uncheckedCast(
+ _communicator.stringToProxy(string.Format(
+ "Util/ProcessControllerRegistry:tcp -h {0} -p 15001",
+ _mainPage.processControllerRegistryHost())));
+ }
await registry.ice_pingAsync();
var connection = registry.ice_getConnection();
connection.setAdapter(_adapter);