I have async method like this in my View Model
public async Task Download()
{
//Do some background thread to do heavywork and recursive task
await Download();
}
Then I call it my view like this
private async Task LoadData()
{
_vm.Download();
//Do other background task
await _vm.DoElse();
}
and call it like this
Task.Factory.StartNew(async()=> {await LoadData();});
Now my question is how I can cancel Download()
?