Example #1
0
        public virtual void Process(Exception ex, ILogger logger)
        {
            object attachObject;

            if (!logger.Data.TryGetValue(MiniDumpCollector.DumpAttachKey, out attachObject))
            {
                return;
            }
            Attachment attach = attachObject as Attachment;

            if (attach == null)
            {
                return;
            }

            AttachmentCollector collector = new AttachmentCollector(attach, 0, Int32.MaxValue, "miniDump");

            collector.PerformProcess(ex, logger);
        }
Example #2
0
        public void Process(Exception ex, ILogger logger)
        {
            if (attachments == null || attachments.Count <= 0)
            {
                return;
            }

            int       totalAttachmentSize    = 0;
            const int maxTotalAttachmentSize = 3 * 1024 * 1024; // 3Mb

            logger.BeginWriteArray("attachments");
            foreach (Attachment attach in attachments)
            {
                AttachmentCollector collector = new AttachmentCollector(attach, totalAttachmentSize, maxTotalAttachmentSize, String.Empty);
                int writtenContentSize        = collector.PerformProcess(ex, logger);
                totalAttachmentSize += writtenContentSize;
            }
            logger.EndWriteArray("attachments");
        }