ProgressBar
<Extension> Public Function WithProgressReporting(Of T)(sequence As ParallelQuery(Of T), increment As Action) As ParallelQuery(Of T) Return sequence.Select(Function(x) If increment IsNot Nothing Then increment.Invoke End If Return x End Function) End Function
Dim completed As Long = 0 Dim queryMatchingFiles = From fi In filelist.AsParallel().WithProgressReporting(Function() Interlocked.Increment(completed)) Where FilterForLTO(fi) = True Select fi Return queryMatchingFiles
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)