iprogress

Console messages appearing in incorrect order when reporting progress with IProgress.Report()

本小妞迷上赌 提交于 2019-11-28 00:20:37
问题 I have noticed a following behaviour. Console output messages appear in an incorrect folder when they are populated by IProgress. var recounter = new IdRecounter(filePath, new Progress<string>(Console.WriteLine)); recounter.RecalculateIds(); I am trying to improve my encapsulation, reusability and design skills. So, I have a class called IdRecounter. I want to use it in a console app for now, but later on perhaps in a WPF app or whatever. Therefore, I want the class to be completely unaware