public override NSArray AttachmentsWithCrashes(MSCrashes crashes, MSErrorReport msReport) { if (_owner.GetErrorAttachments == null) { return(null); } var report = new ErrorReport(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 { AppCenterLog.Warn(Crashes.LogTag, "Skipping null ErrorAttachmentLog in Crashes.GetErrorAttachments."); } } return(nsArray); } 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); }