public void Init() { _lastUpdate = DateTime.MinValue; _lastColor = false; Start = DateTime.UtcNow; AddedFiles = 0; AddedSize = 0; ProcessedFiles = 0; ProcessedSize = 0; DuplicateFiles = 0; DuplicatesSize = 0; PendingDuplicates.Clear(); PendingErrors.Clear(); }
protected override void OnDuplicateFound(int start, int length) { var maxExclusive = start + length; for (var i = start; i < maxExclusive; i++) { PendingDuplicates.Add(CreateDuplicateItem(_files[i])); } DuplicateFiles += length - 1; DuplicatesSize += (length - 1) * _files[start].Length; _lastColor = !_lastColor; if (ShouldUpdate()) { RequestUpdate(); } }