using System; using System.Collections.Generic; using SRDebugger.Services; namespace SRDebugger { public class BugReport { public List ConsoleLog; /// /// User-entered email address /// public string Email; /// /// Raw data of the captured screenshot (png) /// public byte[] ScreenshotData; public Dictionary> SystemInformation; public string UserDescription; } public sealed class BugReportSubmitResult { public static BugReportSubmitResult Success { get { return new BugReportSubmitResult(true, null); } } public static BugReportSubmitResult Error(string errorMessage) { return new BugReportSubmitResult(false, errorMessage); } public bool IsSuccessful { get; } public string ErrorMessage { get; } private BugReportSubmitResult(bool successful, string error) { IsSuccessful = successful; ErrorMessage = error; } } public interface IBugReporterHandler { /// /// Returns true if this bug reporter handler is able to be used. /// If false, the bug reporter tab will be hidden. /// bool IsUsable { get; } /// /// Submit a new bug report to the handler. /// /// The report to be submitted. /// Action to be invoked when the bug report is completed. /// Callback to set the current submit progress. void Submit(BugReport report, Action onComplete, IProgress progress); } }