xyzzer / WinRTXamlToolkit

WinRT XAML Toolkit
Other
282 stars 67 forks source link

TryCatchRetry.RunWithDelayAsync(..) first argument #47

Open artemious7 opened 7 years ago

artemious7 commented 7 years ago

The TryCatchRetry.RunWithDelayAsync(..) methods seem to work incorrectly because of the first argument - being Task or IAsyncOperation. This line await task; doesn't actually re-run the task. It will always return the faulted task, so that whole purpose of the TryCatchRetry logic is lost. Instead of receiving a Task argument, we should take a Func<Task> as the first argument.

Am I getting it wrong?

xyzzer commented 7 years ago

You're most likely correct. Bonus points for a pull request and extra points for a unit test! :) Sorry if I caused you trouble by adding untested code to the toolkit!