static string GenerateCommentsContent(string value) { StringBuilder content = new StringBuilder(); StringWriter writer = new StringWriter(content); TextWriterLogger logger = new TextWriterLogger(writer); logger.WriteValue("userComments", value); return(content.ToString()); }
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); }