IBugReportService.cs 1.2 KB

12345678910111213141516171819202122232425262728293031
  1. namespace SRDebugger.Services
  2. {
  3. using System.Collections.Generic;
  4. public class BugReport
  5. {
  6. public List<ConsoleEntry> ConsoleLog;
  7. public string Email;
  8. public byte[] ScreenshotData;
  9. public Dictionary<string, Dictionary<string, object>> SystemInformation;
  10. public string UserDescription;
  11. }
  12. public delegate void BugReportCompleteCallback(bool didSucceed, string errorMessage);
  13. public delegate void BugReportProgressCallback(float progress);
  14. public interface IBugReportService
  15. {
  16. /// <summary>
  17. /// Submit a bug report to the SRDebugger API.
  18. /// completeHandler can be invoked any time after the method is called
  19. /// (even before the method has returned in case of internet reachability failure).
  20. /// </summary>
  21. /// <param name="report">Bug report to send</param>
  22. /// <param name="completeHandler">Delegate to call once bug report is submitted successfully</param>
  23. /// <param name="progressCallback">Optionally provide a callback for when progress % is known</param>
  24. void SendBugReport(BugReport report, BugReportCompleteCallback completeHandler,
  25. BugReportProgressCallback progressCallback = null);
  26. }
  27. }