Example #1
0
        public override void Stop()
        {
            base.Stop();

            WaitUntilInProgressTransfersComplete();

            XboxGameRepository.Disconnect();
        }
        private UploadResumeReport CheckForResumeUpload(string gameName, string archivePath)
        {
            IXboxGameRepository xboxGameRepository = _xboxGameRepositoryFactory.Create();

            xboxGameRepository.Connect();

            UploadResumeReport uploadResumeReport = null;

            using (IZipFile zip = _zipFileProcessor.Read(archivePath))
            {
                // Order files alphabetically to ensure we can resume interrupted uploads
                List <IZipEntry> files = zip.ReadAllFiles();

                _notifier.CheckingForUploadedFiles(gameName);

                IUploadResumeStrategy uploadResumeStrategy = new BinarySearchUploadResumeStrategy(files, _notifier, gameName, xboxGameRepository);

                uploadResumeReport = uploadResumeStrategy.GetRemainingFiles();
            }

            xboxGameRepository.Disconnect();

            return(uploadResumeReport);
        }