diff options
Diffstat (limited to 'csharp/test/Ice/metrics/MetricsAMDI.cs')
-rw-r--r-- | csharp/test/Ice/metrics/MetricsAMDI.cs | 45 |
1 files changed, 25 insertions, 20 deletions
diff --git a/csharp/test/Ice/metrics/MetricsAMDI.cs b/csharp/test/Ice/metrics/MetricsAMDI.cs index 09a224792da..3243aa6c9f2 100644 --- a/csharp/test/Ice/metrics/MetricsAMDI.cs +++ b/csharp/test/Ice/metrics/MetricsAMDI.cs @@ -8,7 +8,7 @@ // ********************************************************************** using System; -using System.Collections.Generic; +using System.Threading.Tasks; using Test; public sealed class ControllerI : ControllerDisp_ @@ -34,49 +34,54 @@ public sealed class ControllerI : ControllerDisp_ public sealed class MetricsI : MetricsDisp_ { - override public void op_async(Test.AMD_Metrics_op cb, Ice.Current current) + override public Task opAsync(Ice.Current current) { - cb.ice_response(); + return null; } - override public void fail_async(Test.AMD_Metrics_fail cb, Ice.Current current) - { - current.con.close(true); - cb.ice_response(); + override public Task failAsync(Ice.Current current) + { + current.con.close(Ice.ConnectionClose.Forcefully); + return null; } - override public void opWithUserException_async(Test.AMD_Metrics_opWithUserException cb, Ice.Current current) + override public Task opWithUserExceptionAsync(Ice.Current current) { - cb.ice_exception(new UserEx()); + throw new UserEx(); } - override public void opWithRequestFailedException_async(Test.AMD_Metrics_opWithRequestFailedException cb, - Ice.Current current) + override public Task + opWithRequestFailedExceptionAsync(Ice.Current current) { - cb.ice_exception(new Ice.ObjectNotExistException()); + throw new Ice.ObjectNotExistException(); } - override public void opWithLocalException_async(Test.AMD_Metrics_opWithLocalException cb, Ice.Current current) + override public Task + opWithLocalExceptionAsync(Ice.Current current) { - cb.ice_exception(new Ice.SyscallException()); + throw new Ice.SyscallException(); } - override public void opWithUnknownException_async(Test.AMD_Metrics_opWithUnknownException cb, Ice.Current current) + override public Task + opWithUnknownExceptionAsync(Ice.Current current) { - cb.ice_exception(new ArgumentOutOfRangeException()); + throw new ArgumentOutOfRangeException(); } - override public void opByteS_async(Test.AMD_Metrics_opByteS cb, byte[] bs, Ice.Current current) + override public Task + opByteSAsync(byte[] bs, Ice.Current current) { - cb.ice_response(); + return null; } - override public Ice.ObjectPrx getAdmin(Ice.Current current) + override public Ice.ObjectPrx + getAdmin(Ice.Current current) { return current.adapter.getCommunicator().getAdmin(); } - override public void shutdown(Ice.Current current) + override public void + shutdown(Ice.Current current) { current.adapter.getCommunicator().shutdown(); } |