summaryrefslogtreecommitdiff
path: root/csharp/src/IceBox/ServiceManagerI.cs
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2016-07-22 17:57:42 +0200
committerJose <jose@zeroc.com>2016-07-22 17:57:42 +0200
commitb55c347b5178f62db2a175b55900217217a46dbc (patch)
tree914e89427afe92828aac9d01c0a2d7b4046e751a /csharp/src/IceBox/ServiceManagerI.cs
parentMerge remote-tracking branch 'origin/3.6' (diff)
downloadice-b55c347b5178f62db2a175b55900217217a46dbc.tar.bz2
ice-b55c347b5178f62db2a175b55900217217a46dbc.tar.xz
ice-b55c347b5178f62db2a175b55900217217a46dbc.zip
CSharp AMD mapping update
Diffstat (limited to 'csharp/src/IceBox/ServiceManagerI.cs')
-rw-r--r--csharp/src/IceBox/ServiceManagerI.cs17
1 files changed, 8 insertions, 9 deletions
diff --git a/csharp/src/IceBox/ServiceManagerI.cs b/csharp/src/IceBox/ServiceManagerI.cs
index badb590bcce..eaaf1bb8a30 100644
--- a/csharp/src/IceBox/ServiceManagerI.cs
+++ b/csharp/src/IceBox/ServiceManagerI.cs
@@ -10,7 +10,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
-using System.Threading;
+using System.Threading.Tasks;
using System.Diagnostics;
namespace IceBox
@@ -242,7 +242,7 @@ class ServiceManagerI : ServiceManagerDisp_
if(activeServices.Count > 0)
{
- observer.begin_servicesStarted(activeServices.ToArray(), this.observerCompleted, null);
+ observer.servicesStartedAsync(activeServices.ToArray()).ContinueWith((t) => observerCompleted(observer, t));
}
}
@@ -810,7 +810,7 @@ class ServiceManagerI : ServiceManagerDisp_
foreach(ServiceObserverPrx observer in observers)
{
- observer.begin_servicesStarted(servicesArray, this.observerCompleted, null);
+ observer.servicesStartedAsync(servicesArray).ContinueWith((t) => observerCompleted(observer, t));
}
}
}
@@ -827,26 +827,25 @@ class ServiceManagerI : ServiceManagerDisp_
foreach(ServiceObserverPrx observer in observers)
{
- observer.begin_servicesStopped(servicesArray, this.observerCompleted, null);
+ observer.servicesStoppedAsync(servicesArray).ContinueWith((t) => observerCompleted(observer, t));
}
}
}
private void
- observerCompleted(Ice.AsyncResult result)
+ observerCompleted(ServiceObserverPrx observer, Task t)
{
try
{
- result.throwLocalException();
+ t.Wait();
}
- catch(Ice.LocalException ex)
+ catch(AggregateException ae)
{
lock(this)
{
- ServiceObserverPrx observer = ServiceObserverPrxHelper.uncheckedCast(result.getProxy());
if(_observers.Remove(observer))
{
- observerRemoved(observer, ex);
+ observerRemoved(observer, ae.InnerException);
}
}
}