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; } /// /// Message presented to the user to describe the privacy policy. /// Should be one or two sentences, and include markup that presents the visual of a link (see example below). /// /// /// privacy policy." /// ]]> /// string PrivacyPolicyMessage { get; } /// /// Return the URL to the privacy policy for the user to visit if they choose to read it. /// string PrivacyPolicyUrl { 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); } }