I’ve been trying something like this on a ro sdk service:
public async Task GetTargetIncubatorTemperature()
var temp1 = GetTempAsync();
var temp2 = GetTemp2Async();
var t1 = await temp1;
var t2 = await temp2;
return t2 - t1;
This builds, but when I try to run this server I get an exception:
System.NotSupportedException: ‘Cannot publish method InstrumentServerService.GetTargetIncubatorTemperature
Argument type not supported: System.Threading.Tasks.Task`1[[System.Double, System.Private.CoreLib, Version=126.96.36.199, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]’
I know we are trying to do something strange here, but this would really help speed up our service if this would work.
Is there a way to get an async await method with a return value to work server side, without using events?