protected void RaiseScanProgressChanged(bool isCompleted = false) { long fileCount, folderCount, size; lock (lockDicObj) { var folders = currentScannedDic.Values.Where(item => item.ItemCount > 0); fileCount = folders.Sum(item => item.ItemCount); folderCount = folders.Count(); size = folders.Sum(item => item.Size); } if (!ScanProgressChanged.IsNull()) { FileStatisticEventArgs args = new FileStatisticEventArgs(fileCount, folderCount, size, isCompleted); ScanProgressChanged(this, args); } }
protected virtual void OnScanProgressChanged(ScanProgressChangedEventArgs e) => ScanProgressChanged?.Invoke(this, e);
protected void OnScanProgressChanged(int Progress) => ScanProgressChanged?.Invoke(Progress);