I'm need to cancel an API call that returns a Task, but it doesn't take a CancellationToken as a parameter, and I can't add one.
How can I cancel that Task?
In this particular case, I'm using Xamarin.Forms with the Geocoder object.
IEnumerable<Position> positions = await geo.GetPositionsForAddressAsync(address);
That call can sometimes take a very long time. For some of my use cases, the user can just navigate to another screen, and that result of that task is no longer needed.
I also worry about my app going to sleep and not having this long running task stopped, or of the task completing and having need of code which is no longer valid.