private static void StatusUpdate(S3Status status)
 {
     Console.WriteLine(status);
 }
        private void UpdateStatus(S3StausChangedEventHandler eventHandler, Dictionary<string, ProcessItem> files, Dictionary<string, S3Object> list)
        {
            if (eventHandler == null) return;
            var uploading = 0;
            var uploadingTotal = 0;
            var uploadingException = 0;
            var downloading = 0;
            var downloadingTotal = 0;
            var downloadingException = 0;
            var matchingFiles = 0;
            var notProcessedFiles = 0;

            foreach (var file in files) {
                switch (file.Value.Action) {
                    case ProcessAction.Match:
                        matchingFiles++;
                        break;
                    case ProcessAction.Upload:
                        uploadingTotal++;
                        break;
                    case ProcessAction.Download:
                        downloadingTotal++;
                        break;
                    case ProcessAction.UploadingDone:
                        uploadingTotal++;
                        uploading++;
                        break;
                    case ProcessAction.UploadingException:
                        uploading++;
                        uploadingTotal++;
                        uploadingException++;
                        break;
                    case ProcessAction.DownloadingDone:
                        downloadingTotal++;
                        downloading++;
                        break;
                    case ProcessAction.DownloadingException:
                        downloading++;
                        downloadingTotal++;
                        downloadingException++;
                        break;
                    case ProcessAction.Empty:
                        notProcessedFiles++;
                        break;
                }
            }
            var status = new S3Status {
                BucketName = _bucketName, CloudTotal = list.Count + uploading - uploadingException, LocalTotal = files.Count + downloading - downloadingException, 
                Uploading = uploading, UploadingTotal = uploadingTotal, UploadingException = uploadingException, 
                Downloading = downloading, DownloadingTotal = downloadingTotal, DownloadingException = downloadingException, 
                MatchingFiles = matchingFiles, NotProcessedFiles = notProcessedFiles};
            eventHandler(status);
        }
 private static void StatusUpdate(S3Status status)
 {
     Console.WriteLine(status);
 }
        private void UpdateStatus(S3StausChangedEventHandler eventHandler, Dictionary <string, ProcessItem> files, Dictionary <string, S3Object> list)
        {
            if (eventHandler == null)
            {
                return;
            }
            var uploading            = 0;
            var uploadingTotal       = 0;
            var uploadingException   = 0;
            var downloading          = 0;
            var downloadingTotal     = 0;
            var downloadingException = 0;
            var matchingFiles        = 0;
            var notProcessedFiles    = 0;

            foreach (var file in files)
            {
                switch (file.Value.Action)
                {
                case ProcessAction.Match:
                    matchingFiles++;
                    break;

                case ProcessAction.Upload:
                    uploadingTotal++;
                    break;

                case ProcessAction.Download:
                    downloadingTotal++;
                    break;

                case ProcessAction.UploadingDone:
                    uploadingTotal++;
                    uploading++;
                    break;

                case ProcessAction.UploadingException:
                    uploading++;
                    uploadingTotal++;
                    uploadingException++;
                    break;

                case ProcessAction.DownloadingDone:
                    downloadingTotal++;
                    downloading++;
                    break;

                case ProcessAction.DownloadingException:
                    downloading++;
                    downloadingTotal++;
                    downloadingException++;
                    break;

                case ProcessAction.Empty:
                    notProcessedFiles++;
                    break;
                }
            }
            var status = new S3Status {
                BucketName    = _bucketName, CloudTotal = list.Count + uploading - uploadingException, LocalTotal = files.Count + downloading - downloadingException,
                Uploading     = uploading, UploadingTotal = uploadingTotal, UploadingException = uploadingException,
                Downloading   = downloading, DownloadingTotal = downloadingTotal, DownloadingException = downloadingException,
                MatchingFiles = matchingFiles, NotProcessedFiles = notProcessedFiles
            };

            eventHandler(status);
        }