I have hundreds of calls to various external API's that I want to wrap in a generic async function that is capable of doing retries and handling timeouts.
Basically, I think I need to implement something like this function call:
await Retry(()=>someFunctionAsync(doWorkParams, new CancellationToken()), retryCount, timeout);
How do I define such Retry function? Also, how do I call this function from Sync code, as a ton of my calls are housed in the sync methods?