private void Dc_Completed(DirComparatorResult result)
        {
            this.result              = result;
            status.Content           = "Done";
            showDuplicates.IsChecked = false;

            showCommon.IsEnabled = showUnique.IsEnabled = showDuplicates.IsEnabled = true;
            showCommon.IsChecked = showDuplicates.IsChecked = false;
            showUnique.IsChecked = true;
        }
        public async Task <DirComparatorResult> CompareAsync()
        {
            StatusChanged?.Invoke(new DirComparatorStatus()
            {
                Action = DirComparatorAction.Listing, Side = DirComparatorSide.LeftFolder
            });
            FileInfo[] left = await Task.Run(() => leftDir.GetFiles("*", SearchOption.AllDirectories));

            StatusChanged?.Invoke(new DirComparatorStatus()
            {
                Action = DirComparatorAction.Listing, Side = DirComparatorSide.RightFolder
            });
            FileInfo[] right = await Task.Run(() => rightDir.GetFiles("*", SearchOption.AllDirectories));

            //FILTERING
            if (ignore != null)
            {
                left = await Task.Run(() => Filter(left, DirComparatorSide.LeftFolder));

                right = await Task.Run(() => Filter(right, DirComparatorSide.RightFolder));
            }

            //HASH
            var lefthashtask  = Task.Run(() => Hash(left, DirComparatorSide.LeftFolder));
            var righthashtask = Task.Run(() => Hash(right, DirComparatorSide.RightFolder));
            await Task.WhenAll(lefthashtask, righthashtask);

            // COMPARE

            var comparetask = await Task.Run(() => Compare(lefthashtask.Result.Files, righthashtask.Result.Files));

            var result = new DirComparatorResult()
            {
                Common         = DirComparatorFileInfo.ConvertAllToArray(comparetask.Common.Values, DirComparatorFileInfo.FileType.Common),
                Left           = DirComparatorFileInfo.ConvertAllToArray(comparetask.Left.Values, DirComparatorFileInfo.FileType.Unique),
                DuplicateLeft  = lefthashtask.Result.Duplicates.ToArray(),
                Right          = DirComparatorFileInfo.ConvertAllToArray(comparetask.Right.Values, DirComparatorFileInfo.FileType.Unique),
                DuplicateRight = righthashtask.Result.Duplicates.ToArray()
            };

            Completed?.Invoke(result);
            return(result);
        }