public override NSArray AttachmentsWithCrashes(MSCrashes crashes, MSErrorReport msReport) { if (_owner.GetErrorAttachments == null) { return(null); } var report = ErrorReportCache.GetErrorReport(msReport); var attachments = _owner.GetErrorAttachments(report); if (attachments != null) { var nsArray = new NSMutableArray(); foreach (var attachment in attachments) { if (attachment != null) { nsArray.Add(attachment.internalAttachment); } else { MobileCenterLog.Warn(Crashes.LogTag, "Skipping null ErrorAttachmentLog in Crashes.GetErrorAttachments."); } } return(nsArray); } return(null); }
public bool ShouldProcess(AndroidErrorReport androidReport) { if (_owner.ShouldProcessErrorReport == null) { return(true); } var report = ErrorReportCache.GetErrorReport(androidReport); return(_owner.ShouldProcessErrorReport(report)); }
public override void CrashesDidSucceedSendingErrorReport(MSCrashes crashes, MSErrorReport msReport) { if (_owner.SentErrorReport != null) { var report = ErrorReportCache.GetErrorReport(msReport); var e = new SentErrorReportEventArgs(); e.Report = report; _owner.SentErrorReport(null, e); } }
public override void CrashesDidFailSendingErrorReport(MSCrashes crashes, MSErrorReport msReport, NSError error) { if (_owner.FailedToSendErrorReport != null) { var report = ErrorReportCache.GetErrorReport(msReport); var e = new FailedToSendErrorReportEventArgs(); e.Report = report; e.Exception = error; _owner.FailedToSendErrorReport(null, e); } }
public override bool CrashesShouldProcessErrorReport(MSCrashes crashes, MSErrorReport msReport) { if (_owner.ShouldProcessErrorReport == null) { return(true); } var report = ErrorReportCache.GetErrorReport(msReport); return(_owner.ShouldProcessErrorReport(report)); }
public void OnSendingSucceeded(AndroidErrorReport androidReport) { if (_owner.SentErrorReport == null) { return; } var report = ErrorReportCache.GetErrorReport(androidReport); var e = new SentErrorReportEventArgs(); e.Report = report; _owner.SentErrorReport(null, e); }
public override Task <ErrorReport> GetLastSessionCrashReportAsync() { return(Task.Run(() => { var msReport = MSCrashes.LastSessionCrashReport; if (msReport == null) { return null; } return ErrorReportCache.GetErrorReport(msReport); })); }
public override async Task <ErrorReport> GetLastSessionCrashReportAsync() { var callback = new GetLastSessionCrashReportCallback(); AndroidCrashes.GetLastSessionCrashReport(callback); var androidErrorReport = await callback.Result; if (androidErrorReport == null) { return(null); } return(ErrorReportCache.GetErrorReport(androidErrorReport)); }
public void OnSendingFailed(AndroidErrorReport androidReport, Java.Lang.Exception exception) { if (_owner.FailedToSendErrorReport == null) { return; } var report = ErrorReportCache.GetErrorReport(androidReport); var e = new FailedToSendErrorReportEventArgs(); e.Report = report; e.Exception = exception; _owner.FailedToSendErrorReport(null, e); }
public override void CrashesWillSendErrorReport(MSCrashes crashes, MSErrorReport msReport) { if (_owner.SendingErrorReport == null) { return; } var report = ErrorReportCache.GetErrorReport(msReport); var e = new SendingErrorReportEventArgs(); e.Report = report; _owner.SendingErrorReport(null, e); }
public override Task <ErrorReport> GetLastSessionCrashReportAsync() { var future = AndroidCrashes.LastSessionCrashReport; return(Task.Run(() => { var androidErrorReport = future.Get() as AndroidErrorReport; if (androidErrorReport == null) { return null; } return ErrorReportCache.GetErrorReport(androidErrorReport); })); }
public override MSErrorAttachment AttachmentWithCrashes(MSCrashes crashes, MSErrorReport msReport) { if (_owner.GetErrorAttachment == null) { return(null); } var report = ErrorReportCache.GetErrorReport(msReport); ErrorAttachment attachment = _owner.GetErrorAttachment(report); if (attachment != null) { return(attachment.internalAttachment); } return(null); }
public AndroidErrorAttachment GetErrorAttachment(AndroidErrorReport androidReport) { if (_owner.GetErrorAttachment == null) { return(null); } var report = ErrorReportCache.GetErrorReport(androidReport); var attachment = _owner.GetErrorAttachment(report); if (attachment != null) { return(attachment.internalAttachment); } return(null); }
public IIterable GetErrorAttachments(AndroidErrorReport androidReport) { if (_owner.GetErrorAttachments == null) { return(null); } var report = ErrorReportCache.GetErrorReport(androidReport); var attachments = _owner.GetErrorAttachments(report); if (attachments != null) { var attachmentList = new ArrayList(); foreach (var attachment in attachments) { /* Let Java SDK warn against null. */ attachmentList.Add(attachment?.internalAttachment); } return(attachmentList); } return(null); }