InternalBugReporterHandler.cs 739 B

1234567891011121314151617181920212223
  1. using System;
  2. using SRF;
  3. using SRF.Service;
  4. namespace SRDebugger.Internal
  5. {
  6. /// <summary>
  7. /// The default bug report handler - this submits to the SRDebugger API using the API key configured in the SRDebugger
  8. /// settings window.
  9. /// </summary>
  10. internal class InternalBugReporterHandler : IBugReporterHandler
  11. {
  12. public bool IsUsable
  13. {
  14. get { return Settings.Instance.EnableBugReporter && !string.IsNullOrWhiteSpace(Settings.Instance.ApiKey); }
  15. }
  16. public void Submit(BugReport report, Action<BugReportSubmitResult> onComplete, IProgress<float> progress)
  17. {
  18. BugReportApi.Submit(report, Settings.Instance.ApiKey, onComplete, progress);
  19. }
  20. }
  21. }