Ahh yes, the timer's TimerCallback method signature needed to be void DoWork(object state) hence needing another method call that uses async Task accepting a CancellationToken.
But looking at it again I think that DoWorkAsync and RunJobAsync could just be the one method.
I'll take another look later and will try and explain more in another blog post.
Welcome tag moderator AKA Unofficial DEV cheerleader. While most of my friends are found on SnapChat or Tic-Toc, you can find me here. And I OOP, but I’m not a VSCO girl.
Ahh yes, the timer's TimerCallback method signature needed to be
void DoWork(object state)
hence needing another method call that uses async Task accepting a CancellationToken.But looking at it again I think that
DoWorkAsync
andRunJobAsync
could just be the one method.I'll take another look later and will try and explain more in another blog post.
Great! Looking forward to it.