LogifyClientExceptionReport CreateExceptionReport(Exception ex, IInfoCollector collector) { StringBuilder content = new StringBuilder(); StringWriter writer = new StringWriter(content); TextWriterLogger logger = new TextWriterLogger(writer); logger.BeginWriteObject(String.Empty); try { collector.Process(ex, logger); } finally { logger.EndWriteObject(String.Empty); } LogifyClientExceptionReport report = new LogifyClientExceptionReport(); report.ReportContent = content; report.Data = logger.Data; return(report); }