private void Dispatch() { // Make sure that we are not interfering with the crucial startup work); if (!Settings.RemoveThreadSleep) { System.Threading.Thread.Sleep(Settings.SleepBeforeSend * 1000); } // Turncate extra report files and try to send the first one in the queue Storer.TruncateReportFiles(); // Now go through configured destinations and submit to all automatically for (bool hasReport = true; hasReport;) { using (Storer storer = new Storer()) using (Stream stream = storer.GetFirstReportFile()) { if (stream != null) { if (this.EnumerateDestinations(stream) == false) { break; } // Delete the file after it was sent storer.DeleteCurrentReportFile(); } else { hasReport = false; } } } }
internal void VerifyAndDeleteCompressedReportFile(bool verifyCustomReport) { using (var storer = new Storer()) using (var stream = storer.GetFirstReportFile()) { Assert.NotNull(stream); this.VerifyIndividualReportItems(stream, verifyCustomReport); storer.DeleteCurrentReportFile(); } }
internal void DeleteGarbageReportFile() { using (var storer = new Storer()) using (var stream = storer.GetFirstReportFile()) { if (stream != null) { storer.DeleteCurrentReportFile(); } } }
private void Dispatch() { // Make sure that we are not interfering with the crucial startup work); if (!Settings.RemoveThreadSleep) { Thread.Sleep(Settings.SleepBeforeSend * 1000); } // Truncate extra report files and try to send the first one in the queue Storer.TruncateReportFiles(); // Now go through configured destinations and submit to all automatically for (var hasReport = true; hasReport;) { using (var storer = new Storer()) using (var stream = storer.GetFirstReportFile()) { if (stream != null) { // Extract crash/exception report data from the zip file. Delete the zip file if no data can be retrieved (i.e. corrupt file) ExceptionData exceptionData; try { exceptionData = this.GetDataFromZip(stream); } catch (Exception exception) { storer.DeleteCurrentReportFile(); Logger.Error("An exception occurred while extraction report data from zip file. Check the inner exception for details.", exception); return; } // Now submit the report file to all configured bug report submission targets if (this.EnumerateDestinations(stream, exceptionData) == false) { break; } // Delete the file after it was sent storer.DeleteCurrentReportFile(); } else { hasReport = false; } } } }