I have a method that returns immediately and accepts callback function when the job is done:
public static void CommandCompleteFunction(ulong taskID)
{
...
}
_taskID = device.MoveTo(position, CommandCompleteFunction);
How can I wrap this in order to return Task result whenever callback is called? Result(true/false) is determined inside callback.