internal void StartDownload(DownloaderWorker worker) { if (Progress != CrashReportProcessingProgress.NotStarted) { throw new InvalidOperationException(); } Progress = CrashReportProcessingProgress.Downloading; string file = PersistentState.Database.GetKey("crashdumps_zip_folder") + "\\" + Guid + ".zip"; _worker = worker; _worker.Enqueue(Guid, WebFileLocation, _key, file); _worker.StatusChanged += WorkerOnStatusChanged; }
internal void StartDownload(DownloaderWorker worker) { if (Uri.TryCreate(WebFileLocation, UriKind.RelativeOrAbsolute, out Uri uriLocation)) { if (Progress != CrashReportProcessingProgress.NotStarted) { throw new InvalidOperationException(); } Progress = CrashReportProcessingProgress.Downloading; string file = PersistentState.Database.GetKey("crashdumps_zip_folder") + Path.DirectorySeparatorChar + Guid + ".zip"; _worker = worker; _worker.Enqueue(Guid, uriLocation, _key, file); _worker.StatusChanged += WorkerOnStatusChanged; } else { throw new InvalidOperationException(); } }