Exemplo n.º 1
0
            public bool ShouldProcess(AndroidErrorReport androidReport)
            {
                if (ShouldProcessErrorReport == null)
                {
                    return(true);
                }
                var report = ErrorReportCache.GetErrorReport(androidReport);

                return(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 void OnSendingFailed(AndroidErrorReport androidReport, 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);
        }
Exemplo n.º 4
0
        static Task <ErrorReport> PlatformGetLastSessionCrashReportAsync()
        {
            var future = AndroidCrashes.LastSessionCrashReport;

            return(Task.Run(() =>
            {
                var androidErrorReport = future.Get() as AndroidErrorReport;
                if (androidErrorReport == null)
                {
                    return null;
                }
                return ErrorReportCache.GetErrorReport(androidErrorReport);
            }));
        }
Exemplo n.º 5
0
            public void OnBeforeSending(AndroidErrorReport androidReport)
            {
                if (SendingErrorReport == null)
                {
                    return;
                }
                var report = ErrorReportCache.GetErrorReport(androidReport);
                var e      = new SendingErrorReportEventArgs
                {
                    Report = report
                };

                SendingErrorReport(null, e);
            }
Exemplo n.º 6
0
            public void OnSendingFailed(AndroidErrorReport androidReport, Java.Lang.Exception exception)
            {
                if (FailedToSendErrorReport == null)
                {
                    return;
                }
                var report = ErrorReportCache.GetErrorReport(androidReport);
                var e      = new FailedToSendErrorReportEventArgs
                {
                    Report    = report,
                    Exception = exception
                };

                FailedToSendErrorReport(null, e);
            }
Exemplo n.º 7
0
#pragma warning disable RECS0146 // Member hides static member from outer class
            public IIterable GetErrorAttachments(AndroidErrorReport androidReport)
#pragma warning restore RECS0146 // Member hides static member from outer class
            {
                if (Crashes.GetErrorAttachments == null)
                {
                    return(null);
                }
                var report      = ErrorReportCache.GetErrorReport(androidReport);
                var attachments = Crashes.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);
            }
        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);
        }