diff options
author | Bernard Normier <bernard@zeroc.com> | 2021-01-14 12:12:47 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-14 12:12:47 -0500 |
commit | 05edde5bcae0e5ee6b31bdb9923a8e5bb80fede1 (patch) | |
tree | fae64c8758ed0226c7bc005ce9372c6a511b643c /csharp/test/Ice/operations/MyDerivedClassI.cs | |
parent | Moved alias test from Slice to Ice test directory. (diff) | |
download | ice-before_streamline.tar.bz2 ice-before_streamline.tar.xz ice-before_streamline.zip |
Switch to Async skeletons in Ice core (#1240)before_streamline
Diffstat (limited to 'csharp/test/Ice/operations/MyDerivedClassI.cs')
-rw-r--r-- | csharp/test/Ice/operations/MyDerivedClassI.cs | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/csharp/test/Ice/operations/MyDerivedClassI.cs b/csharp/test/Ice/operations/MyDerivedClassI.cs index e9335f16ad6..334efc4a722 100644 --- a/csharp/test/Ice/operations/MyDerivedClassI.cs +++ b/csharp/test/Ice/operations/MyDerivedClassI.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; using System.Threading; +using System.Threading.Tasks; using ZeroC.Test; namespace ZeroC.Ice.Test.Operations @@ -16,28 +17,31 @@ namespace ZeroC.Ice.Test.Operations private int _opByteSOnewayCallCount; // Override the Object "pseudo" operations to verify the operation mode. - public bool IceIsA(string id, Current current, CancellationToken cancel) + public ValueTask<bool> IceIsAAsync(string id, Current current, CancellationToken cancel) { TestHelper.Assert(current.IsIdempotent); - return typeof(IMyDerivedClass).GetAllIceTypeIds().Contains(id); + return new(typeof(IMyDerivedClass).GetAllIceTypeIds().Contains(id)); } - public void IcePing(Current current, CancellationToken cancel) => TestHelper.Assert(current.IsIdempotent); + public ValueTask IcePingAsync(Current current, CancellationToken cancel) + { + TestHelper.Assert(current.IsIdempotent); + return default; + } - public IEnumerable<string> IceIds(Current current, CancellationToken cancel) + public ValueTask<IEnumerable<string>> IceIdsAsync(Current current, CancellationToken cancel) { TestHelper.Assert(current.IsIdempotent); - return typeof(IMyDerivedClass).GetAllIceTypeIds(); + return new(typeof(IMyDerivedClass).GetAllIceTypeIds()); } - public string IceId(Current current, CancellationToken cancel) + public ValueTask<string> IceIdAsync(Current current, CancellationToken cancel) { TestHelper.Assert(current.IsIdempotent); - return typeof(IMyDerivedClass).GetIceTypeId()!; + return new(typeof(IMyDerivedClass).GetIceTypeId()!); } - public void Shutdown(Current current, CancellationToken cancel) => - current.Communicator.ShutdownAsync(); + public void Shutdown(Current current, CancellationToken cancel) => current.Communicator.ShutdownAsync(); // TODO check if compress is supported. public bool SupportsCompress(Current current, CancellationToken cancel) => false; |